Quasi-optical theory of relativistic submillimeter surface-wave oscillators