Further optimize blend mode math

- Only perform under/overflow checks when explicitly required by a blend
mode.

- Avoid costly alpha blend step if top layer is opaque (alpha = 255)

- Fix Divide blend mode to use 1 if denominator is 0. (Technically, the
new value is undefined, but it should tend toward infinity instead of 0
- this provides identical results to GIMP, and avoids unsightly
per-channel distortion if only some channels are undefined).

- Avoid costly HSL transforms on Color and Luminosity modes for the
layer that's only supplying luminance values.  (Instead, just calculate
luminance directly.)
Fix potential image thumbnail bug

Not sure why this was triggering under GDI+ only (not FreeImage), but it
should be fixed now.
Fix FreeImage JPEG loading quality

Turns out the Fast/Accurate flag *does* make a difference!  PD will now
always require Accurate transforms.
Greatly simplify render pipeline thanks to recent compositor improvements

Because the new getCompositedRect function works so well, I can finally
drop the separate render pipeline branches for zoomed in vs zoomed out
vs 100% zoom.  All viewport rendering now uses the same code, regardless
of zoom level.

(The only remaining difference for zoomed in vs zoomed out viewport
rendering is the interpolation method used; high-quality bicubic
resampling with prefiltering is used when zoomed out, while nearest
neighbor is used when zoomed-in.)