Commit the compacted index before returning it. Failing to compact here could cause errors trying to resume a compaction due to timeouts while searching for a header. See COUCHDB-994