BUG: LeafTreeIterator does not produce correct output.

The LeafTreeIterator uses a PreOrderIterator internally in its implementation,
but it initializes with its current position, which the PreOrderIterator
considers as the start of its subtree and will cause the PreOrderIterator to
terminate prematurely. This causes the LeafTreeIterator to incorrectly
end after its first value.

To correct the behavior the Root of the helper PreOrderIterator is adjusted.
This is done by naming the LeafTreeIterator a friend class to maintain
efficiency, correctness, and backwards compatible behavior.

This patch also improves expected value testing in the unit test.

Change-Id: Id6aea31dec1131b45b046924bdc72dfbcf907602
Suggested-by: Hoang Van Thai <hvthaibk@gmail.com>
Merge topic 'LeafTreeIterator'

76a2854 BUG: LeafTreeIterator does not produce correct output.