Workaround serialized attributes bug

If a record has serialized attributes, record.init_with(coder) will modify coder to wrap the serialized attributes. When MemoizedCacheProxy is used, the coder persists for the duration of the request, so later calls to fetch will return the same coder instance and record.init_with(coder) will again modify the cached coder by re-wrapping the already wrapped serialized attributes.

This works around the modification of the cached coder by duplicating both the coder hash and its "attributes" hash before calling init_with if the record type has serialized attributes.
Merge pull request #88 from Shopify/workaround_serialized_attributes_bug

Workaround serialized attributes bug