clean up compaction code and refactor to allow user-specified threadhold (minimum number of CFs to compact). patch by jbellis