Exception handling between DOI DB threaded transactions

Timeout errors on 11/20 were traced back to the DOI minter waiting for
a lock on the db file.  Likely means a begin/end call wasn’t balanced.
It’s possible that an exception was thrown before a transaction was
ended, and this change should address that and log any instances where
it would occur.
Merge pull request #439 from datadryad/doidatabase_locking

Add Exception handling between DOI DB threaded transactions