Bugfix text-content functions

This is the first set of functionality around narrative items.

Affected functions:
- get-text-content-by-hash
- store-text-content
- delete-text-content

Also update the test suite to confirm that these actually work as
intended.