lsqlite3: backport support for lua 5.2

lua 5.2 is needed to build core/handler.c when lua support is enabled.

The build fail if lua 5.1 is used:
error: 'LUA_OK' undeclared (first use in this function)
warning: implicit declaration of function 'luaL_newlib'
warning: implicit declaration of function 'luaL_requiref'

But the local copy of lsqlite3 needs lua 5.1 to build:
warning: implicit declaration of function 'lua_strlen'
warning: implicit declaration of function 'luaL_openlib'
warning: implicit declaration of function 'luaL_register'
undefined reference to `lua_strlen'
undefined reference to `luaL_register'

Backport lua 5.2 support from upstream commit
[01d436858c] "working toward Lua 5.2 compatibility"

Signed-off-by: Romain Naour <romain.naour@openwide.fr>