Implemented a decent hash function for contexts.

Implemented szudziks pairing function to generate a unique integer from a pair of ints.