basic LUA bindings for the console

and the necessary internal adjustements.
rename to be more adherent to the C API

and to avoid keyword conflicts.