[new index structure] Fixes bug in BTreeLeafIterators (empty trees hasNext) and in BTree.max/minKeys.