Storage and Monad API refactor

**WIP DO NOT MERGE**

Some (possibly most) data sources will, in practice, need read-only access to the retcon storage API so that they can, e.g., translate identifiers with which they reference other objects as data comes in to the system. This is, by design, almost impossible with the current architecture, which uses two different monads to isolate the data source actions from the handler API.

This series of changes refactors essentially all of the things, with a view to:

1. Split the storage API into read and write fragments.

2. Unify handlers and data source actions in a single monad, which is indexed by storage API access (read-only vs read-write).

3. Change the types on several core API functions to simply operation (storage-related functions are in the unified monad and use the values which index for access levels rather than taking a "handle" as an argument).

Some additional, only tangentally related, changes which were convenient to do at the same time:

1. Remove all trace of PostgreSQL-specific code from the main test-suite (indeed, this suite runs using in-memory storage now). This is *heaps* faster than creating and dropping a database 16 times!