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

This test checks the fix of #5303 issue. It depends from PR https://github.com/rails/arel/pull/216