Fix mainmenu stall on network operations

This is a quite heavy fix by adding asynchronous lua events. The issue could've been solved by special handling network operations but I'm not a friend of adding one special handling for this another for that and next one for something else.

This code can be used for in game asynchronous calls too but due to current stabilization phase I don't want to open up a new critical subsystem within scriptapi.

More information can be found here:
https://github.com/sapier/minetest/wiki/Minetest-Asynchronous-Lua