Fix crash in crash reporter

psycopg2.ProgrammingError leaves aborted transaction on db object
causing all sub-sequent queries to fail with "InternalError: current
transaction is aborted". Crash handler uses db so the handler itself
would crash and the crash report was never sent. Instead rollback db
when crash happens, before we start processing it.

The ProgrammingError (fixed in other review) can be reproduced by:
/confirmmerge?id=-1