(#2807) - auto_compaction properly trims tree

I figured out the bug. It turned out we put a `1` as the height of the tree when it should have been `0`, because that value was referring to the max distance from the leaf in order to keep it.

So actually this has been broken for some time, because we only compacted a tree down to its leaf+1 branch, rather than down to the leaf. We also had a broken unit test that was not correctly verifying that all non-leafs are deleted.