Put all the things that are on a map square in one struct in the submaps.

Instead of having several arrays, one for each thing that can be on a map square (one for terrain, one for furniture, items, ...), have only one array of mapsquare objects. Each of those stores a terrain, a furniture, an item vector, ...

It allows for easier addition of map square properties, easier access to it (via map::ms_at, which does bound-checking etc.) and easier conversion to 3D.
Apply astyle to some map functions
Make the vehicle cache map use a point instead of a pair of ints.

Because it's not some arbitrary pair of ints, it's a point.

Replace some manual checks with inbounds function, the checks were wrong
anyway as they did not include the lower end (x==0 or y==0).
Add getter functions for suibmaps in map::grid

Use those function whenever the grid was accessed.
Always use the get_nonant function to calculate the index of the
requested submap. Do not calculate the nonant directly.

Use range based loops for accessing map::grid.
Fix map rotation code:

Now also rotates fields, all members of the cosmetics map and radiation.
Bypasses all map limitations by swapping the mapsquare objects directly.
This ensures consistency and is more robust.
Simplify and enhance map::rotate further:

Access the submap pointer through getter functions, no direct access to map::grid.
Rotate temperature, field_count and active_item_count as well.
Erase the separate logic for rotating the computer, instead rotate it like any other submap object inside the already existing loops.
Fix vehicles on submap not being erased in editmap.cpp
Move the map::get_nonant call into map::copy_grid

Yes, that's what it does: instead of calling copy_grid(get_nonant(...)) it calls copy_grid(...) and copy_grid calls get_nonant.
However, copy_grid only needs the nonant of the "to" submap, and it needs the actual submap coordinates anyway, so instead of calculating them back from the nonant, use the parameters directly.
Remove redundand parameters from map::saven/map::loadn

Those parameters indicate the absolute position of the map, but this is alread known and stored in the map itself:
It is set via map::set_abs_sub load(), generate() and shift().