Re #1643:
* simulation of malloc failure
* enabled LUA_USE_APICHECK in simu
* changed Lua GC to step mode after each Lua task cycle (it is enough)
* skip Lua stack downsize if new size is less than 40 stack elements smaller