Fix Arel deprecations
Sample deprecation messages:
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)
DEPRECATION WARNING: Delegating join_sources to arel is deprecated and will be removed in Rails 6.0. (called from project_clusters_base_query at /builds/gitlab-org/gitlab-ce/app/models/clusters/clusters_hierarchy.rb:62)
Edited by Heinrich Lee Yu