Viewport pipeline: finish extension and final optimizations!

This addresses the vast majority of issues described in #147, and
performance should be pretty darn great as of this commit.

The front buffer now avoids re-creating itself whenever possible.  This
means much less memory churn and significantly better performance,
particularly when RAM is tight.

A newly extended pipeline separates out UI overlays (except selections)
into their own final stage.  This makes custom cursors much easier to
render, and it will also allow me to optimize color management, once
some changes are made to the underlying pdCanvas control.

This was one of the major blockers for paint tools, so it's great to
have it done.