Rewrite lighting to use engine's 6d facedir prediction code
changed the names of a couple of internal functions to compensate.

this makes lib_6d.lua obsolete.