Tests for setMaxLeaves
Various tests that see if it picks the correct depth to store,
get, and remove documents. It is important that you never get
a situation where the same key is stored twice at two different
depths. At the same time it should automatically keep the number
of documents (not subfolders) in a folder always inbetween zero
and the value of maxLeaves at the time of adding something. In
practice this simply means that it creates a new subfolder if
maxLeaves is reached.
Ignore maxLeaves if key is too short
While writing the comment of the previous commit, I realized there
was a danger that tryDepth would try to go too deep for short keys.
The deepest you can go is `depth === key.length`, then you get for
instance path 'f/o/o/_' for key 'foo'. This means maxLeaves can be
violated if you have a lot of short key names, but if you stick to
a small alphabet in the key naming then it will never get extreme.