A defensive method for reducing the damage created by an incoherent TCDB 

Tokyo Cabinet has some serious design faults when it comes to handling the way updates of records are stored to the hard disk. This generally ends with a partially "incoherent" TCDB file.

Hopefully, TC provides an API call for "optimizing" and fixing these incoherences.

Because the cost for running this call could be high for general performance, we restrict its usage to every action of opening a new cursor.

A more conservative approach would be to call this optimization call each time we open a database or make a delete/write call.