Use #model_name on instances instead of classes

This allows rails code to be more confdent when asking for a model name, instead of having to ask for the class.

Rails core discussion here: https://groups.google.com/forum/#!topic/rubyonrails-core/ThSaXw9y1F8
Add a `required` option to the model generator

Syntax was chosen to follow the passing of multiple options to
decimal/numeric types. Curly braces, and allowing any of `,`, `.`, or
`-` to be used as a separator to avoid the need for shell quoting. (I'm
intending to expand this to all columns, but that's another PR.

The `required` option will cause 2 things to change. `required: true`
will be added to the association. `null: false` will be added to the
column in the migration.
Add a test case of nested empty array values in conditions

  Post.where(id: [[]]).to_a

Used to fail with a SQL syntax error (until 4.1):

  SELECT ... WHERE id in ();

It now properly generate:

  SELECT ... WHERE 1=0;
Merge pull request #16062 from sgrif/sg-required-generators

Add a `required` option to the model generator
Merge pull request #15889 from carnesmedia/model-name

Use #model_name on instances instead of classes
No need to check model_name anymore
Fix ActiveJob isolation tests.
Merge pull request #16534 from lucasmazza/lm-fix-rescue-test

Fix ActiveJob isolation tests.
Expectations first
Expectations first
Fix rails-html_sanitizer in Gemfile template

[skip ci]
Merge pull request #16540 from jonatack/patch-9

Fix rails-html_sanitizer in Gemfile template
"warning: `*' interpreted as argument prefix"
Merge pull request #16528 from byroot/add-test-case-for-nested-array-in-where-conditions

Add a test case of nested empty array values in conditions