Transactions for clients
This patch moves transactions out of the database component, allowing clients to perform multiple database calls in a single transaction. This should improve efficiency and reliability, at the cost of increased boilerplate for database calls.
Operations that allow hooks, such as adding and removing contacts, pass their transactions to their hooks. This ensures the whole operation is atomic and isolated, so StorageStatus is no longer needed, hooks don't need to be idempotent, and locks can be removed from clients that were using them for isolation.
This merge request is marked WIP because it will conflict with !74 (closed).