fix a bunch of stuff on Mac OS X

First, opening-files-with-the-.app is supported! This took a lot of
work though.

The first thing was adding our declaration of support to the Info.plist
file, which required backporting the old Python's plistlib module and
writing a script that uses it to inject the filetype information into
Info.plist.

But, unlike everyone else, OS X doesn't use command-line arguments to
indicate which files to open. It instead requires you use a proprietary
Java API. This would have resulted in incredible complexity in our
build process to use the stub JAR which might not even be supported
anymore, but fortunately I remembered it's Python and we can just
reflect all that stuff. So, jes.__main__ now imports a module with
platform support for OS X, that installs the appropriate API.

Second, now that the launcher accepts command-line arguments, JES
started receiving a weird Apple legacy thing called a Process Serial
Number on the command line. I added code to JESstartup to ignore it.

Third, now that I had a platform-specific module, I moved the
dock-image-setting code there too, which meant I could remove it from
JESstartup.

Finally, I threw in some extra application handlers to make the
"JES" menu items "Preferences" and "Quit" work.