pithos: Recover from DB integrity errors

In Pithos+ atomicity is forced on the container level.
Hence, write operations in the account level can produce integrity errors.

This commit handles these cases.

In PostgreSQL, a transaction is aborted (and all the subsequent commands are ignored)
if an integrity error occurs.

Therefore, before performing an command that can produce an integrity error,
a new savepoint is defined inside the transaction,
and after the command execution, is rollbacked or committed
according to execution status.