Yet another major change list.

- Added depth layer sorting.
- Added immediate rect_image depth construction.
- Rewrote map rendering code to use new depth sorter and a more
integrated functional approach that uses lambda functions to draw
special layer sources.
-