Imports map_api.lua helper code.
Adds map.getTerrainProfile(…) also adds some basic handler code for resource cleanup during reboots.