Implement iterator for Trie leaves.

More iterators could be constructed by similar methods.