[ci skip] Fix typo in rails guide for routing
get rid of shadowing warning when running tests AR and railtie tests.

Warning looked like this:

```
/Users/senny/Projects/rails/activerecord/lib/active_record/associations/association_scope.rb:142: warning: shadowing outer local variable - reflection
```
build fix, we have to reset the RACK_ENV as well.

This is a follow-up to ded17a4 to get the build passing on Travis.
As Travis has `ENV["RACK_ENV"]` set to `test` we need to reset that as well.
Enums shouldn't ruin people's anniversaries

Added a few more methods on Module/Class to the dangerous class methods
blacklist. (Technically, allocate and new are already protected currently because
we happen to redefine them in the current implantation.)

Closes #16792
Merge pull request #16799 from rramsden/fix-typo

[ci skip] Fix typo in rails guide for routing
Follup to PR #16762

Remove chain from parameters, it's no longer needed since chain and i
are being passed via next_reflection

Change name of `reflection` to `owner_reflection` because of shadow
variable warning. The last reflection will always be the owner.
Merge pull request #16797 from eileencodes/refactor-add_constraints-followup-to-16762

Followup to PR #16762