Improve hashing

This pull request significantly improves the hashing function used by the diagram cache. The gains are dramatic that when this branch is used with the NetKAT compiler, compilation speeds have been observed to improve by an order of magnitude.

To observe this, try compiling the abfattree example in the frenetic repo, and compare compilation times.