Better docs for AV::RecordIdentifier

This commit intends to clarify the scope of ActionView::RecordIdentifier
methods `dom_id` and `dom_class`.

Most of the current documentation comes from da257eb8 (7 years ago) when
the decoupling of ActionView, ActiveRecord and ActiveModel was not a concern.

Since then, steps have been taken to reach such decoupling, especially
8ca17926 which duplicated ActionController::ModelNaming into
ActionView::ModelNaming explaining that:

> These are just a simple helpers for decoupling Active Model, so it does not
> make sense to extract it to Active Support, but the point is to decouple also
> Action View and Action Pack

As of today, ActionView::RecordIdentifier only includes `dom_id` and `dom_class`
so it makes sense to explicitly document those two methods, and leaving the
details of helpers like `div_for` in the corresponding files.

Moreover, I think it's important to mention in the documentation that
ActionView::RecordIdentifier **does not strictly depend on the ActiveRecord API**: any class `Post` implementing `post.to_key` and `post.model_name.param_key` will work.

[ci skip]
Fix form_for to work with objects that implement to_model

Previously, if you tried to use form_for with a presenter object
that implements to_model, it would crash in
action_dispatch/routing/polymorphic_routes.rb when asking the presenter
whether it is .persisted?

Now, we always ask .persisted? of the to_model object instead.

This seems to been an issue since 1606fc9d840da869a60213bc889da6fcf1fdc431

Signed-off-by: Eugenia Dellapenna <eugenia.dellapenna@gmail.com>
Template lookup now respect default locale and I18n fallbacks.

Given the following templates:

    mailer/demo.html.erb
    mailer/demo.en.html.erb
    mailer/demo.pt.html.erb

Before this change for a locale that doesn't have its related file
the `mailer/demo.html.erb` will
be rendered even if `en` is the default locale.

Now `mailer/demo.en.html.erb` has precedence over the file without
 locale.

Also, it is possible to give a fallback.

    mailer/demo.pt.html.erb
    mailer/demo.pt-BR.html.erb

So if the locale is `pt-PT`, `mailer/demo.pt.html.erb` will be
 rendered given the right I18n fallback configuration.

Fixes #11884.
AR specific length validator to respect `marked_for_destruction`.

Closes #7247.

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/test/models/owner.rb
Merge pull request #18251 from tjgrathwell/fix-polymorphic-routes-to-model

Fix form_for to work with objects that implement to_model
Remove single space response body for head request

- The single space response was added due to a bug in safari
  in https://github.com/rails/rails/commit/cb0f8fda9652c4d24d04693bdb82cecd3b067e5c
  and
  https://github.com/rails/rails/commit/807df4fcf021fc4d15972aa1c17ba7398d43ab0d.
- This was removed from the `render nothing: true` in
  https://github.com/rails/rails/pull/14883.
- Removing it from response of :head also. As :head is more obvious
  alternative to call `render nothing:
  true`(http://guides.rubyonrails.org/layouts_and_rendering.html#using-head-to-build-header-only-responses),
  removing it from head method also.
- Closes #18253.
Merge pull request #18255 from prathamesh-sonpatki/fix-single-space-for-head

Remove single space response body for head request
Merge pull request #18130 from claudiob/better-record-identifier-doc

 Better docs for AV::RecordIdentifier [ci skip]
Use more semantic method to check password
Tiny documentation fixes [ci skip]
 Fix description for application_name method - change simple to simply

 [ci skip]
Merge pull request #18258 from prathamesh-sonpatki/fix-application-name-description

 Fix description for application_name method - change simple to simply [ci skip]
Merge pull request #18256 from rohit/secure-password-tweak

Use more semantic method to authenticate password in SecurePassword
Remove this line which was added by accident [ci skip]