Fix deprecation when using raw SQL fragments
Raw SQL fragments should now be wrapped in Arel.sql.
Sample deprecation message:
DEPRECATION WARNING: Dangerous query method (method whose arguments are used as raw SQL) called with non-attribute argument(s):
"MAX(relative_position) AS position". Non-attribute arguments will be disallowed in Rails 6.0. This method should not be called with user-provided values, such as request parameters or model attributes. Known-safe values can be passed by wrapping them in Arel.sql(). (called from calculate_relative_position at /builds/gitlab-org/gitlab-ee/app/models/concerns/relative_positioning.rb:182)