Bug 10240 QA follow-up (2): ensure transactions are deleted

A race condition existed that resulted in pending transactions only
getting deleted from the local database in certain circumstances (fast
connections under Chrome, mostly). This patch fixes that so that
successfully-uploaded transactions are always deleted.