fix race condition between when memtable is replaced as the active one and when it's added to the set of historical (pending flush) memtables. patch by jbellis; reviewed by Eric Evans for CASSANDRA-161