Huge preferences overhaul

This was a blocker for a number of other tasks, so very nice to have it
done!

PhotoDemon's preferences handler grew in leaps and bounds over the past
few releases.  Unfortunately, its swift growth quickly outpaced the
original design of the preferences file (INI format) and associated
code.  New preferences and features were shoehorned into the old design,
and even after this summer's conversion to XML, the old layout and
formatting resulted in a difficult-to-maintain mess.

But no more!  Preferences are now sorted by category, and all data
exists in the preferences file in the same order it exists on the
Preferences dialog.  This makes it extremely easy to add/remove/update
preferences (and the associated dialog) without breaking the software.
I was also able to correct some long-standing preference-related issues.

Many files were changed, so apologies for the commit size.

(I've also added a preference for metadata handling at load-time, but
it's not fully integrated yet - errors may occur if the preference is
changed!)