Fix for COUCHDB-78. Couchdb was failing to close open file handles when compaction attempts need to be retried.