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.
Fix generating winresource.o with build dir != source dir
Add Ability to use Lua to provide a Database backend
Implement listAllLoadableBlocks