fix of glass interface bug

for a long time the glass interface was suggested not to have zeros in
the x,y direction even if the glass was perfectly perpendicular to the
z (imaging) axis. This is only for the simple reason of getting NaN
when the vectors were getting zero length. This commit fixes this bug
by introducing the unit_vector function that does not create NaN for
unit_vectors of zero length. Instead it returns the original vector.
In addition, the old_ray_tracing call is depreciated and the
ray_tracing is now called without any translation to the old type.
additional trivial checks are added.