SAN DIEGO—A 22-year-old former nursing student pleaded guilty Tuesday to murder and other charges in connection with a deadly shooting at a Southern California synagogue on the last day of Passover. John T. Earnest avoided the death penalty with his plea in San Diego Superior Court. The San Diego County district attorney’s office said he…