Laser phase and frequency stabilization using an optical resonator