Extracting HashTable & enforcing safe TupleFormats

This commit extracts HashTable to its own class, allowing proper static
initialisation.

This commit also enforces safety in TupleFormat by asserting that two
fields do not share a common hashcode. This should make debugging easier
in the future - adopting the fail-fast ethos:
http://en.wikipedia.org/wiki/Fail-fast