Switch code from using the old 'raise E,MSG' to the modern 'raise E(MSG)'

Partly because DWiki is quite old, its code started out using the old
Python exception raising syntax of 'raise CLASS, STR-MSG' and was never
updated to 'raise CLASS(STR-MSG)'. This commit fixes that, hopefully
without any errors.

(Regexp based changes can misfire and this is all in error paths that
are hard to test and trigger rarely, if at all.)
Switch code from using 'except CLS, VAR:' to using 'except CLS as VAR:'

Until now DWiki was using the old style of catching exceptions with
the actual variable. It's now switched to the modern Python 2.6+ style
(which is required in Python 3). In the process some exception clauses
stopped picking up the exception variable because they weren't using it.
Explicitly open a few binary files in binary mode

DWiki has a few files that contain binary contents instead of text,
primarily the global-authseed file and anything in any of its caches
(which are all pickled data). I used to just open them in text mode
because it didn't make a difference. Now the code explicitly opens them
in binary mode because this better prepares DWiki for a hypothetical
future port to Python 3.

(If DWiki works on Windows I'll be amazed and it's certainly not a
coding goal, so I don't consider that a reason to use binary mode on
opens.)
Switch to modern list sorting with key= and reverse= arguments

DWiki used to do all custom sorting through list .sort()'s cmp= function
argument. The better, clearer way is to use the key= and reverse=
arguments as applicable, so that's what the code does now.

(This is also necessary for Python 3, where .sort() has no cmp= argument
at all.)