References are now managed as RAII objects, cLuaState::cRef.
Destructor now calls correct function, either Close() or Detach(), based on the owned-ness of the lua_State *.
The cLuaState class is a wrapper for the lua_State * and for the common functions on it. The cPlugin_NewLua has been rewritten to use it instead of the raw pointer. Part of #33