The advantage is that luaL_tolstring behaves the same as the native lua
tostring() function, while lua_tostring() does not. In particular, boolean
values are converted properly to "true" and "false" now, while they were
not converted with lua_tostring()
Add a unit test too
When we convert from a lua table to a GVariant dictionary, it is not
possible to maintain the hybrid string & integer keys approach that Lua
has for tables, so we convert all keys to strings and a table becomes a{sv}
When we convert back from a{sv} to a table, it is desirable to get back
the integer keys wherever possible.
The use case is to pass "arrays" (i.e. tables with integer keys) from
the configuration files to the lua scripts, without losing the properties
of the "array"