Better handeling of function references.  lua_function_reference<return_type(arg1, arg2...)>(state, stackindex).