model caching: circumvent marshaling bug.

The problems we had, actually did not occur when converting an arel, but were due to a bug
described here:
https://github.com/mperham/dalli/issues/250

This circumvents this bug, but writing a cache takes a little longer.
model caching: clean up and correction to ActiveRecordCacheExtension cache deletion.