Theory of frustrated total internal reflection: Superluminal singularities of optical waveguides