Fix hashes for end SegmentDescriptions

b99dad901abe447d29b4cccc6771ad09c77325f0 gave end Segments unique
hashes, but the only hashes used are from SegmentDescription.
Consequently only one end segment per slice was being stored and
retrieved. Create unique hashes for SegmentDescription end segments
based on direction and consolidate all segment hash logic into
SegmentHash.