buffer writing of compression meta data, and make sure stream is closed
Merge branch 'cassandra-2.1' into trunk