Implemented dirty flag for map transparency cache and outside cache.
Converts most map->grid accesses to wrapper functions.

This'll make it easier to scale this up to 3d, and also to change the way submaps are stored and accessed.

Preliminary work for #6818
Fixed a few bugs with vehicle movement.
Merge branch 'map3d_grid_access_refactor' into map3d_wip

Conflicts:
	src/map.cpp
	src/map.h
map::grid refactor part 2.
map::grid refactor part 3.
map::grid refactor #4
Merge cache dirty flags and map accessors.
Initializa caching flags.