Fixes based on feedback r=twobraids
* Change RETURNING to 1 or 2 based on update or insert
* Remove savepoint and try/except block for processed_crashes insert
* Fix error in UPSERT SQL