Prevent [response].flatten from recursing infinitely.

This was causing problems for RSpec users (see [this comment](https://github.com/rspec/rspec-rails/issues/601#issuecomment-33885030)) since rspec-expecations has a place where it uses `Array#flatten` on an array containing objects passed to RSpec by users, and if that array contained a rails response, it would recurse infinitely.

It would also be nice to backport this and get it in upcoming patch fixes in whatever other recent versions suffer from this problem.