update for lua 5.2
Replace abs_index() with Lua 5.2 lua_absindex() and add a backward
compatibility define.  Fix issue with side-effect within assert().
Replace lua_setfenv() and lua_getfenv() with Lua 5.2
lua_setuservalue() and lua_getuservalue() and add backwards
compatibility shims for 5.1.
Replace luaL_register() with luaL_setfuncs() and add 5.1 backwards
compatibility layer.
Make cmake work with both Lua 5.1 and 5.2
Remove test dependency on alien library, only define SIGPOLL, SIGPWR, and SIGSTKFLT if the plaform allows it.