Effects -> Natural -> Sunshine is now integrated

Many thanks to @audioglider for another excellent filter.  Really lovely
work, as always.
Keyboard accelerators: prevent them from eating keystrokes in common dialogs
Various minor UI improvements

- Clean up layer toolbox buttons and add tooltips.
- When deleting a layer, activate the layer that appears at the same
position on-screen (rather than activating the layer with the same index
number).
- Much faster viewport refreshes when just changing the active layer.
(We don't need to recomposite the image, so skip that step entirely.)
- Faster restoration of the default cursor after an action has
completed.  Amazing how something as small as this makes the program
feel snappier.
prep/finalizeImageData: add support for caller overriding automatic premultiplication handling

If alpha handling is unnecessary, functions can gain some speed by
overriding automatic handling of premultiplication reversal.  However,
any function that changes image alpha (e.g. Blur, etc) should never use
this, or invalid alpha values will result!

This feature is primarily for effects and adjustments that only affect
RGB values.
pdSelection: reduce debug messaging
Pixelate effect: fix to process the alpha channel, if one exists

Without this, the resulting effect is uuugly on 32bpp images.
Adjustments > Levels: UI overhaul

This should *finally* bring the Levels dialog into line with other photo
editors.  Apologies that it took me so long to fix this.

Still to-do on this dialog:

- "Auto levels" button
- Color selectors for input shadow/highlight tones
- Toggle for logarithmic vs regular histogram
- Possibly separate channel handling.  I have already included code for
generating and rendering individual RGB histograms.  However, some deep
changes would be required to the Levels mapping itself, so I'm holding
off until I've gotten a better handle on how extensive the code changes
would need to be.
Adjustments > Levels: add support for per-channel levels

Uuuugh, changes like this are a headache.  When a dialog doesn't have a
1:1 correlation between on-screen controls and affected data, a lot of
custom handling is required to make sure presets and last-used settings
behavior persists properly.  This Levels tool is particularly messy
because the text up/down limits are codependent, because the input
shadow level cannot exceed the input highlight level (and vice-versa).

I think I've sorted everything out, but it's always hard to know until a
few days have passed and the dust has settled...
Adjustments > Levels: implement Randomize option
GDI+ interface: new "fill rect" function

Helpful for rapidly setting new RGBA data to a DIB
pdDIB: finally implement "set alpha at creation time"
Command bar: fix various parsing issues
"Add new layer" dialog

Helpful for setting a base color layer when working with 32bpp images
Rewrite central convolution filter code

PD now provides a standalone "ConvolveDIB" function, which will apply an
arbitrary 5x5 convolution filter to any source and destination DIB.
This makes it much easier to utilize convolution filters internally,
without having to reproduce the full convolution filter function over
and over again.

Existing functions that make direct use of arbitrary convolution filters
have been rewritten to account for this update
Effects > Find Edges: overhaul dialog and underlying code

One of the recurring requests I get for PD is more/better artistic
effects, specifically ones that recreate a "hand-painted" sort of look.
There are a lot of ways to create such filters, but many rely on
edge-processing algorithms to find image edges, which the filters than
further process to mimic a "hand-painted" look in varying styles.

To that end, I have overhauled PD's edge detection code (and
corresponding dialog) to make it more amenable to internal use by other
functions.  Directionality is now explicitly supported, with capable
filters updated to process edge detection in horizontal, vertical, or
both directions simultaneously.  PD's (awesome!) layer compositor allows
us to blend results from multiple blend directions quickly and
accurately, and of course all previous edge-detection features are
unchanged by the overhaul.

This new structure will also make it much easier to add more advanced
edge detectors (Canny, etc) in the future, should I feel so inclined.
pdCanvas: new status bar features

- Dedicated "fit image on screen" button at the far left
- Instead of allowing Image Resize by double-clicking the image size
(which is a UI paradigm never used elsewhere in the program), convert
the Image Size icon to a clickable button.  This mirrors the clickable
zoom buttons to the left, and is a much more consistent interaction
expectation.
- Minor layout adjustments
Rendering engine: make some calculations floating-point to avoid checkerboard show-through

This fixes a rare edge case where GDI's PatBlt and GDI+ calculate render
bounds differently, potentially leaving a thin strip of checkerboarding
around non-transparent images (despite GDI+ tile wrap mode being used).
Drag/drop: fix save state calculation for downloaded images

Same fix as 435cb4631457cd651f9af7d3c773dfa39f4bd89c, but I forgot to
mirror those changes across the drag/drop variant of the code.
Adjustments > Levels: implement color selection UI

- Color selector boxes now reflect the relative colors of the current
shadow/highlight settings
- When the shadow or highlight color is directly changed (by clicking on
a color box), all on-screen elements are automatically synced to the new
color
- Separate color picker buttons allow the user to assign
shadow/highlight colors by right-clicking the preview box
Adjustments > Levels: best-in-class Auto Levels feature

I'm not exaggerating when I call PD's Auto-Levels "best in class",
because it consistently outperforms the same feature in GIMP, Paint.NET,
and Photoshop.

I have a lot of experience with auto-leveling, as PD's White Balance
tool is really just an auto-leveler.  (Same with the Shadow/Highlight
tool, though it takes a slightly different approach to the problem.)
Because of this, I'm pretty familiar with the shortcomings of
traditional Auto-Level algorithms.

The biggest problem with most auto-levelers is that in trying to fix
lighting issues, they introduce nasty color casts.  By independently
redistributing each RGB channel, auto-leveled images almost always take
on tonal shifts that screw up the original composition.  Skin tones in
particular tend to experience severe cooling, which makes subjects look
like corpses standing under fluorescent lights.

To get around these issues, PD's algorithm is custom-designed, and it
uses a mix of per-channel and uniform corrections that produce really
excellent lighting fixes without screwing up an image's existing
tonality.  Here are two easy testing photos to compare results:

http://nicobass.deviantart.com/art/Lara-Croft-89-163521265
http://nicobass.deviantart.com/art/lara-Croft-90-167090912

CG images are excellent for testing light-adjustment algorithms, as
they're ideally lit under very specific conditions, and they don't have
any auto-correction applied in advance by a camera.  These two images
are particularly tricky for auto-leveling, as one is deliberately
over-exposed while the other is deliberately under-exposed, and they
have completely opposite tonal temperatures.

Comparing the auto-leveling results of GIMP, Paint.NET, Photoshop, and
PD shows that PD's results are far and away the most faithful to the
original tonalities, while still greatly improving contrast and
saturation.  Clicking through the individual channel histograms shows
how PD selectively mixes per-channel and luminance corrections to arrive
at a really nice result, with no clipping issues and no severe
temperature shifts in either image.  Compare this to say Paint.NET's
corrections, which completely destroy both images, or GIMP's
corrections, which achieves reasonably good contrast fixes, but at the
cost of the original warm vs cool tonality of each image.

In case it's not obvious, I'm quite pleased with PD's implementation.
:)  A standalone one-click menu entry for this is forthcoming, pending
some additional testing.