Add support for Rack::ContentLength middelware

Currently, Rails is not compatible with `Rack::ContentLength` because `ActionDispatch::Response::RackBody` instances don't respond to `to_ary` and, even though it's not part of the Rack spec, it's how Rack decides if a body has a knowable length. There's some discussion in https://github.com/rack/rack/commit/2b3abc73f3e3a23110f2c8f43458416674130511, which was later reverted leading to #1160. And a little more in https://github.com/rack/rack/commit/94952077baa9cb6a8712064baab51eba6f43adb1. 

IMO, Rack should remove the `to_ary` check. This change provides immediate support and should continue to work if / when Rack does make the change.
I am concerned about the performance impact of this change.  Calling undef_method will break method caches, which means people will add the ContentLength middleware and unwittingly ruin performance of their app.

Can we consider an implementation of `to_ary` that returns nil?