Add a note on custom validation contexts.

The documentation on `:on` for validations was inconsistent, and most
only referenced the `:create` and `:update` contexts. I fixed those to
be consistent with the documentation on `AM::Validations.validates`,
which seemed to have the best docs.

[ci skip]
Use #tr instead of #gsub where possible
fix typo in in define_model_callbacks comment [ci skip]
Merge pull request #17172 from rselk/typo

fix typo in in define_model_callbacks comment [ci skip]
Fix underscore inflector handling of adjacent acronyms

I suspect that positive lookbehind would have been used in the
original implementation had it been available in supported Ruby
versions at the time. Now that Rails requires Ruby 1.9.2 or above,
this is no longer an issue.

This fixes #14146 for acronyms such as APIRESTful. This technique also
addresses namespaced acronyms that are not entirely uppercased. This
was broken when the commit was originally written but has since been
fixed in ccbb481. The latter does not deal with adjacent acronyms so
this commit wins.
Merge pull request #17150 from effektz/tr-instead-of-gsub

Use #tr instead of #gsub where possible
Merge pull request #14146 from chewi/fix-underscore-acronyms-regex

Fix underscore inflector handling of namespaced and adjacent acronyms
:heart: 1.9
Merge pull request #16409 from justinweiss/update_validation_context_documentation

Docs: Add a note on custom validation contexts. [ci skip]
Clarify possible validations you can use to avoid a NULL boolean value
in the database. Closes #16304 [ci skip]