added layer type accessor, save function to map, updated tests

experimenting with layer insert, added an additional accessor and
mapfile dump to see understand layer ordering and updating.