Sort the environment properly

The Rack environment has mixed String and Symbol keys. These cannot be
compared, therefore you get the error reported in
josevalim/rails-footnotes#77.

- Added a spec with multiple examples for this behaviour.
Merge pull request #115 from halostatue/patch-1

Sort the environment properly