Bugfix for `encode_with_override` psych extension

The original PR was #609 but it had a merge conflict. If you merge this, please also close #609.

The `coder` passed to ActiveRecord::Base#encode_with does not necessarily have
a `tag=` method (it may just be a Hash). This causes issues with other callers,
eg https://github.com/Shopify/identity_cache/blob/master/lib/identity_cache/query_api.rb#L140

Conflicts:
	lib/delayed/psych_ext.rb