Fix rendering glitches when far from the center of the map
Replace pause and message menu by formspec ones
Stop wasting time in abm - performance improvement

Unless I'm mistaken, the chunk of code I'm moving there is potentially
executed hundreds of times inside the loop to get the exact same result
every time
Update set_mapgen_params and set_gen_notify Lua API to use new flag format
Fix race condition on exit to menu
Update ABM object counts when triggers add objects

Also fixes long-standing accuracy issue due to unknown wider
object count not being incremented.
Correct misleading detached inventory error message

Looks like a bit of hasty copying and pasting from s_item.cpp.
Merge branch 'master' of https://github.com/minetest/minetest

Conflicts:
	src/environment.cpp