Fixed all the Lua51 unit tests, by enforcing Ray semantics and fixing engine enums.