use proper types in lua

* ints changed to cint
* the source has been cleaned up with {.push/pop.}
* lua 5.2 has been removed (it is incompatible)