fix compression tests by optionally waiting for compression to finish when closing a tlogcollection