Fix tombstone crash and get on tombstone
Not using proxy entry anymore
Fix tombstone accounting
Refactor passes all tests

Except for expiry, which is unrelated.
Made iterators lock the keydir now that entries can change during
iteration.
Added some more debugging macros.