Electromagnetic Waves in Toroidal Vessels of Arbitrary Cross Section Filled with Radially Inhomogeneous Dielectric Medium