lua-utils: add a workaround for occasional Lua stack overflow.

We have a systematic stack-handling bug throughout our codebase.
We never ever grow the Lua stack according to our needs. We rely
on the default available space to be enough. When we occasionally
do run out of stack space, this causes severe memory corruption.

This is quite easy to trigger with Lua 5.1.x but much harder with
Lua 5.2.x (I could not reproduce this with it at all).

This patch is merely a desperate attempt to try and hide the
damage caused by the bug. In a couple of commonly used functions
we make sure there's plenty of space in the stack and hope that
it will be enough also for those who do not take care of this
themselves.

Eventually we'll need to properly fix this throughout the code.