Make classes hashable in py3
Lots of stuff to munge str/bytes