CHEF-5198: a better fix

- reverts previous fix to CHEF-5198
- applies stream handler middleware in (proper) reverse order
- adds debugging around middleware application
- moves dumping of response header debugging to before applying
  response/streaming middleware
Merge pull request #1369 from opscode/lcg/CHEF-5198-2

CHEF-5198: a better fix