Basic layer toolbox rendering

A key piece of plumbing.  Lots left to do, obviously, but I now have a
rendering framework to work from.
Layers can now be added to an image

...frightening amount of code in this commit, with lots of miscellaneous
things added, particularly in relation to Layer toolbox interaction,
loading random images to random DIBs, and other layer-related-stuff.

Viewport still doesn't render a composited image, but now that I can
actually create multi-layer images, it's time to start working on that!