Optical Spectroscopy and X-Ray Detections of a Sample of Quasars and Active Galactic Nuclei Selected in the Mid-Infrared from Two Spitzer Space Telescope Wide-Area Surveys