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