Add test for ActiveRecord::Relation YAML serialization, for #5303 issue