Allow databases to idle close

cbugg: bug-941
Close databases that were opened for compaction after compaction

cbugg: close bug-941