Fixes bug 1032851 - add a retry if we get a duplicate on UPSERT

This is to address a race condition where we have two instances of a processor (thread or process) that get ahold of the same crash at the same time. It's possible in this situation for the UPSERT calls to happen close enough together that both UPDATEs fail and both INSERTs are attempted, resulting in a "duplicate key" error on one of the INSERTs. In that situation, we just have the failed UPSERT call retry.
I bet we do. This is a driver-specific thing.. I'm assuming we're operating with autocommit off, in which case we definitely need an explicit rollback if we don't have the rollback stuff baked into our transaction management.