General polarized ray-tracing method for inhomogeneous uniaxially anisotropic media