Adding luaref to namespace LuaC and making it inherit from LuaParam

so that it may be treated like a parameter. An ASSERT is used to make
sure the state that you want to use the reference in is the same as the
one it actually exists in.