datastore: fix - mark transactions as finalized.

The recent API refactoring removed the functionality where `save` and `delete` operations mark the transaction as finalized. This brings it back.
If an error occurs, we don't finalize the transaction? What can be done if the transaction is not finalized? Can it be re-committed?