Update views and test for database refactor

Partially update views and SopnetTest for changes to the database from
the pysopnet refactoring. Note the necessity of `id_to_hash` and
`hash_to_id` to marshal between signed (Postgres) and unsigned (sopnet)
slice/segment id/hash representations when parsing requests or preparing
responses.

With these changes the test script will run through to SliceGuarantor
saving conflict sets, where it will fail due to changes in the
representation of conflict sets not yet implemented in sopnet. On
re-running, it will fail earlier in the script when associating blocks
to slices, because it duplicates entries while there is now a unique
tuple constraint. Views not called in these parts of the script have not
been tested.