copied changes from most recent version of dcjones' hat-trie

This includes an updated pstdint.h for improved compatibility.