In some cases the database update can fail, and this could leave the transaction open.
Eventually, it will be collected and the transaction disposed so it will be sorted, but in the meantime attempts to save settings will fail as SQLite does not support multiple active transactions.
This PR adds failure dispose of the transactions in a few places to ensure failures does not cascade outside the original failure.