Digital system for automatic control of optical resonators used as GW detectors