Add support for c++ member function

I think it'll be much convenient to directly create a function-type Variable from c++ member function and call it from lua and c++, as a single function can be used both for c++ and for lua and we don't need to write any api functions like int xxx(lua_State*). (Also static functions can be supported in the same way.)
There's a few others around the place, you can change the whole style, or the ones you added to the existing one; as long as it's consistent.