Electro-optic interface for ultrasensitive intracavity electric field measurements at microwave and terahertz frequencies