First working version

Passes all tests, plus a few more that seemed important.
Still to need to comment and look for ways to make more efficient.
I used a nested class called Node that handled pretty much all the work,
but I'm pretty sure I can abstract it out to TrieSet.