Magic wand selections: implement toolbox UI

Magic wand has a unique assortment of options relative to other
selection tools, so the toolbox UI code is fairly involved.
pdInputKeyboard: improve comments
Lasso and Polygon selections: bug fixes for bound checking

Polygon and lasso selections introduce some tricky business if they lie
off the image.  Consider an easy shape, like an equilateral triangle,
placed well below the image so that only the triangle's tip overlaps the
bottom of the image.

PD's existing boundary code will force all boundaries in-bounds, so in
the case of the triangle, the bounds check will take the region enclosed
by the triangle, and make sure the left, right, top, and bottom all lie
in-bounds.  For this example, only the bottom value would need to be
modified, but as long as the left and right boundaries are within the
range [0, width], they won't be changed by the bounds-checker.

Unfortunately, this new rect doesn't actually represent the correct
region!  What we need to do is actually find the geometric
*intersection* between the shape and the image.  This results in not
only a much smaller rect, but also a better result for preview windows.
Viewport renderer: fix order of interface decorations

They should be drawn before the selection is overlaid
Magic Wand selections: initial commit

Lots of fine-tuning and debugging left to do, but the magic wand is now
capable of at least generating selections.

A new pdFloodFill class does all the heavy lifting.  Some options (like
antialiasing) are not yet implemented, but the traditional contiguous
bucket fill seems to work great, and it's also extremely fast.  (Without
any special optimizations, it already outperforms both GIMP and
Paint.NET - yay!)

Next up is a bunch of debugging, implementing weird variants like global
fill, etc.
Magic Wand selections: many bug-fixes and optimizations

Minus a few settings that simply aren't implemented yet (antialiasing,
global searching), this tool should now be working very well.

A few cool features worth noting:
- The mouse can be click-dragged, and the wand origin will follow, so
you can see a "live preview" of the wand area without waiting.

- After releasing the mouse, a node will be displayed at the wand
origin.  Click-drag to pick new origins, and see live results.

- Threshold can be adjusted after clicking, again with live previews, so
you can pick the right threshold very precisely.
Magic Wand selections: implement basic keypresses

Arrows to nudge, Del to erase selected pixels, Esc to clear selection,
etc.

Shift/Ctrl modifiers would be really nice for this tool, but I'm not
sure I can implement it with the current engine design... but I'll
investigate.
Magic Wand selections: implement global search mode