Only merge scopes with zero arity in has_many through

with dynamic conditions.

Fixes #16128

This bug was introduced in https://github.com/rails/rails/commit/c35e438620f2d56562251571377995359546393d
so it's present from 4.1.2-rc1 and after.

https://github.com/rails/rails/commit/c35e438620f2d56562251571377995359546393d
merges any relation scopes passed as proc objects to the relation,
but does *not* take into account the arity of the lambda.

To reproduce: https://gist.github.com/Agis-/5f1f0d664d2cd08dfb9b
Deprecated .deliver / .deliver! to .deliver_now / .deliver_now!
Updated rdoc / guides / release notes related to ActiveJob / ActionMailer
Require ActiveJob in case a skip_xxx option is given

Change position of require active_job
Merge pull request #16585 from nicolasblanco/require_active_job

Require ActiveJob in case a skip_xxx option is given
Merge pull request #16582 from cristianbica/actionmailer-deprecate-deliver

Deprecated ActionMailer .deliver and updated ActionMailer / ActiveJob docs/guide
Fix typo in rdoc [ci skip]
Merge pull request #16586 from seuros/master

Fix typo in rdoc [ci skip]
Merge pull request #16172 from Agis-/hmt_scope_arity

has_many :through with dynamic condition merging
[Rdoc] Make clear that we are sending an AR object [ci skip]
Merge pull request #16587 from seuros/master

[Rdoc] Make clear that we are sending an AR object [ci skip]
Point release notes to stable branch for list of commits. [ci skip]
Same as f39cb2b except backport friendly

Point release notes to stable branch for list of commits. [ci skip]
Same as f39cb2b except backport friendly

Point release notes to stable branch for list of commits. [ci skip]
Default url_to to a full URL in mailer when possible

[close #16497]

Currently `link_to ..., @user` will generate a non working link inside of a mailer. This is because it delegates to url_for https://github.com/rails/rails/blob/master/actionview/lib/action_view/routing_url_for.rb#L95 which produces a path by default instead of a url. This PR defaults all output of `url_for` to be a full url (instead of a path) when possible.

It is important to note that there is a `url_for` inside of the mailer view (as referenced above) and there is also a `url_for` that can be called inside of a mailer method:

```
class UrlTestMailer < ActionMailer::Base

  def exercise_url_for(options)
    @from_method = url_for(options)
    mail(to: "foo@foo.com", subject: "Welcome",
      from: "system@loudthinking.com", date: Time.local(2004, 12, 12))
  end
end
```

This second `url_for`, called from a mailer method directly delegates to a __different__ `url_for` located in https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/routing/url_for.rb. This second `url_for` produces a URL by default.

This PR merges both behaviors by having the view `url_for` invoke the `url_for` defined on the mailer (the "controller" in this case). This should prevent #16497 and provide seamless mailer experience