ray_tracing fix with the mess

I'm sorry for creating this mess, and I hope Yosef can fix it - the problem is that I pushed this branch to openptv without pull request first and then tried to reverse it, but seemingly not very well. 

the details of this pull request are in the previous commit message, see 

54c1eebf1b221fb8ae93a7ff121ce01ac3832050


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.