add luaA_Type to the prototype of pushfunc and to func

this ease code factoring since these functions can now be reused with multiple types
More const corrections
Merged in Pull request