Only cache attributes for ActiveRecord objects

Cache collection associations using their reflection object, and
reconstruct them manually.