make compact! subclass friendly
make compact! subclass friendly

compact! had a reference to DB in it, so that if you have a subclass 
(such as the JSONDB example), running compact! would re-encode your 
data in the wrong format. This patch changes it to create the new 
blank db with the same format as the original. 
propublica/daybreak,propublica/daybreak