lua: support regular lua C library

Not all systems have luajit or a need for luajit. For low bandwidth
and offline support regular lua may be sufficient.
lua: deal with FreeBSD and OpenBSD

FreeBSD pkg-config lua-5.1.pc, lib liblua-5.1.so
OpenBSD pkg-config lua51.pc, lib liblua5.1.so

Default (linux) pkg-config: lua5.1.pc, lib liblua5.1.so
lua/luajit: use HAVE_LUA mostly

Only use HAVE_LUAJIT if things are done differently from HAVE_LUA,
like in the states pool.