Prevent the user from resizing layers into oblivion

They must be at least 1px by 1px; this is now properly enforced.
Add additional canvas transform checks to the MergeLayer function
Make on-canvas layer transforms permanent when necessary

For the most part, PD's on-canvas layer transforms (e.g. resizing) are
non-destructive.  This means that you can resize a layer as much as you
want, without actually affecting the original layer contents.  This even
extends to applying adjustments - applying adjustments to a transformed
layer will result in an application to the *original* data, not the
transformed data, for true non-destructiveness!

However, under some circumstances, it is necessary to make any
transforms permanent, in order to assure correct behavior of other
transforms.  For example - before arbitrarily rotating an image, any
layer transforms must be made permanent; otherwise, the rotation will
only apply to the original layer data, and because cartesian coordinate
transforms are not associative (e.g. resize -> rotate does not produce
the same result as rotate -> resize), the resulting image will be
incorrect.

The same goes for selections.  When a selection is created over the top
of a layer with non-destructive transforms active, any actions applied
to that selection can't be applied to the original layer data (because
it's not representative of the selection the user sees on the screen).
Thus, we must make the on-canvas transforms permanent, to ensure proper
treatment of the selected area.

I have tried to be careful about when non-destructive transforms must be
made permanent.  As a result, all Adjustments and Effects do not require
a permanent application of non-destructive layer transforms - UNLESS a
selection is active, in which case, any transforms will be made
permanent.  This is perhaps not ideal, because per-pixel area transforms
like "blur" or "sharpen" might better be performed on the transformed
data rather than the original (to ensure the user gets what they want),
but I'm not sure how best to deal with that, so I'm erring on the side
of "maintain non-destructiveness as much as possible".

(This commit description probably makes no sense, but hey - I tried.
This shit is complicated!  :p)