Followup to CASSANDRA-6916 - fix bug in cleanup and add unit test.
Merge branch 'cassandra-2.1' into trunk