lua : rename _internal functions to _typeid

this is more consistent with the calls in the luaA library and the internal
versions are used quite a lot, so the _internal name was misleading