Move the code to generate submaps to the beginning of map::loadn

Also add a debugmsg when generation failed, because that will most likely lead to a crash and there should be something (directly visible to the user, not inside a log file) that hints what the cause was.

Replace "worldx + gridx" with absx, which is calculated just a few lines above.
Move code to actualize the content of a just loaded submap into separate function
Move set_abs_sub before calling map::loadn.

map::loadn loads a single submap, it makes no sense to adjust that coordinate here, it affects the whole object.
It's far better to set this
a) when loading the map with map::load, which loads all submaps at once.
b) when shifting. It s already called there. It must be called outside of loadn there because it's not garanted that loadn(0,0, ...) is called there at all. And only when called with gridx==gridy==0, set_sub_abs is called in map::loadn.
astyle map::actualize

Removed pointless check "g->active_ncp.size() >= 1", the iteration handles the case of an empty vector just fine.
Extract the item rot away on the map code into a function.
Cleanup the fill-funnel code in map.cpp:

Combine two loops into one, makes no sense to extract the trap locations into a map just to look it up again in the same function.
Proper boolean expressions: no comparison with true or false.
Extract the fill-funnel code into a separate function.

Also use iterator based iteration, no stored index, instead store a pointer to the item itself.
Extract growing (furniture) plants into a function

Instead of getting the furn_id from the map and than looking that up in the furnlist,
this gets the furn_t object directly and uses the loadid from it instead.
Also avoid changing the items vector directly and change the bday of the seed item directly without copying it.
Extract logic for the regrowing fruits on static plants (terrain).

Use map::ter_at to directly access the ter_t object, use the other ter_set function that accepts a string, it will automatically transform it into an ter_id for us.
Add PRESERVES flag to containers and prevent contents from spoiling.

Contents of item with that flag are ignored in map::remove_rotten_items,
and prevented from spoiling by setting item::last_rot_check to the current turn in item::process.
This prevents the item::calc_rot function from doing anything, and (as it does not change item::rot) also prevents the item from rotting at all.
Prevent containers with differently charged charged contents from stacking.