Fix refactor migration for populated databases
Change segment/slice foreign keys to bigint

South failed to change foreign keys to the segment and slice tables from
varchar to bigint during the previous migration. Change these keys,
remove varchar-based indices, add constraints, and add indices.

Note that although value conversion is used, because many of the slice
hashes use the MSB, value conversion from string representation of the
hash to bigint will fail due to signed 64-bit limits. There is no
straightforward way to handle this case in Postgres, and because all the
old data is deprecated anyway all tables should be empty when running
this migration.
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.
Djsopnet: add migration to allow NULL in pixel values of a slice
Merge branch 'blockwise-sopnet' of https://github.com/catsop/CATMAID into features/user-constraints/wip-rebase
Changed hash_value field to id field to remain compatible with the database
Added function to compute a section wise dictionary of super graph nodes
Added __init_.py to /applications/djsopnet/control to be able to load skeleton_intersection.py as a module
Make slice shape fields nullable in model also
Normalize segment-slice relation and solutions

Create a SegmentSlice model to allow arbitrary configurations of the
segment-to-slice relationship, normalizing out the three slice keys in
the previous segment table. Normalize SegmentSolution for existential
semantics, drastically reducing row count.
Replaced algorithm to find userconstraints based on a skeleton with a new version. The new version takes branches into account and has a simpler structure.
Added a list of uncompatible locations. Uncompatible locations are edges in the super skeleton graph for which no compatible segment was found. The list is intended for visualisation in catmaid.
Initial function to retrieve slices for a given skeleton
Initial backend API to retrieve slices for a skeleton
First attempt to display slice PNGs in the 3d viewer
Slice display in 3d viewer working for active skeleton which needs generated UserConstraints
Include slices for branch and continuation segments
Merge branch 'features/slice-display-3d/wip' of github.com:catsop/CATMAID into features/slice-display-3d/wip
Merge remote-tracking branch 'origin/blockwise-sopnet' into features/slice-display-4d/wip