ThreadPool: don't use std::function when disabled
Lua: use luaL_check... & luaL_opt...