fix bug where dirty commit logs were removed (and avoid keeping segment with no post-flush activity permanently dirty) patch by slebresne; reviewed by jbellis for CASSANDRA-2829