Speed up clear()
Before the clear() bug was fixed, t/03_bighash.t took 45 sec., for me
at least. It was using a ‘first_key next_key*’ approach, which ended
up skipping keys, since they were being deleted during iteration. When
clear() was fixed, a ‘first_key+’ approach was used, which was *much*
slower, since it created a new iterator object for each key. That test
script ended up taking 2 hours!
I found that a compromise, using ‘first_key next_key*’ repeatedly
until first_key stopped returning a key, would reduce the time to 65
seconds. Then I found that pushing the functionality further inside
the engine and freeing the index or bucket list reduces it to 25 sec-
onds. Transactions make things a little more complicated, so I fall
back to the compromise in the presence of transactions.