Fix cache persistence when both row and key cache are enabled
patch by Mikhail Stepura and jbellis for CASSANDRA-6413
merge from 1.2