cmd-key-happy: use luaL_newstate as lua_open is deprecated

Makes it easier to move to newer versions of Lua.
build: use lua build machinations for liblua.a

Makes it easier to move to newer versions of Lua.