move config, vconfig, tstring and helper functions to lua_common

Probably lua_common should be split up further, it's a bit
crowded