tagptr -> tagptr_t
wtrie -> wtrie_t
Use insertion sort to maintain order
Use tagged pointers to store trie children.

There's now a bug that causes a stack overflow when computing
frequencies on large data sets.