Fix critical command-line image loading bug

The old command-line image detection code was firing before the main
window was initialized, causing all sorts of horrific behavior.  I have
now moved command-line image processing to *after* the window manager's
full initialization.
Generate an XML metadata database if one isn't found

Editing image metadata is coming!  There are a lot of nuances to
implementing such a feature, not least of which is - how to allow the
user to add new tags to a file?  Do we let them enter anything they
want, and we just hope it's a valid tag name?  Or can we give them a
list of "all possible tags" to choose from?

I've discovered that ExifTool can be coerced into providing a "master
list" of all supported tags, whether they are writable, and what
datatype they use (e.g. "string" or "int32").  It can also be coerced
into providing this info in XML format, which is lovely as far as PD is
concerned.

With this commit, at load-time PD will look for an XML metadata database
inside the plugins folder.  If one is not found, it will generate one
(asynchronously).  This need only be done once; the database is good
forever once created.