Electromagnetic dyadic Green's functions for multilayered spheroidal structures. I: formulation