Optical to Near-infrared Transmission Spectrum of the Warm Sub-Saturn HAT-P-12b