Reverse order of exception printing and mailing, so that exceptions during
mailing don't prevent the underlying error from being displayed.
Some hacking trying to install ExceptionNotifier middleware if isn't there yet.