db/gdbm: Automatically reorganize database

We now automatically reorganize the database for speed, consistency
and size reasons, once 50 deletions have taken place in a given
database file. After this, the deletion count is reset.

Signed-off-by: Michael Ikey Doherty <michael.i.doherty@intel.com>