Rename some essential public variables

Some of the oldest parts of PD include the core image tracking code
(e.g. anything relating to the pdImages array).  The code surrounding
that array is generally of poor quality, including a lot of variables
with indistinct names, which is unfortunate considering that pretty much
every aspect of the program interacts with it at some point.

This commit is an attempt to fix some of the worst offenders.  (I am
also trying to be better about using a "g_" prefix on global (public)
variables.)
New requestThumbnail function

One of the interesting challenges of implementing layers is that
external functions should no longer attempt to directly access an
image's DIB, because if multiple layers are in use, any requests for a
copy of the image (such as for a thumbnail to place in the MRU list or
taskbar) will require the compositor's help.

To that end, the pdImage class now exposes a requestThumbnail function,
which all thumbnail-related functions should use in place of directly
accessing pdImage.mainLayer.
Greatly simplify and clean-up custom form and taskbar code

This code has been through a bunch of rewrites, first using pure-VB code
then later using FI to simplify things.  As part of tying those
functions into the new pdImage.requestThumbnail function, I thought it
worthwhile to rewrite everything as a few self-contained functions.
Much better.

(Note that the MRU thumbnail code has not yet been rewritten - that will
happen later as part of an MRU engine rewrite.)
Fix minimum form size handling to account for resize handle directionality

Fixes #95.  With thanks to @Kroc for finding and reporting.