Monkey patch to fix WEBrick chunking semantics.

 * Previously proposed in #707, unfortunately that patch caused double encoding
 * Fixes #707, #618
 * The longevity of this patch is dubious. If WEBrick makes identical semantics
   modifications as I think should be done, this patch will have no effect. If
   WEBrick introduces changes to internal header handling, class structure, etc,
   we'll break.
default_middleware_by_environment should always returns empty array for unknown keys

The current behaviour break rails server for any environment different
of development.

This behaviour was removed at 704be37e with a warning that if this
behavior is supported tests need to be added. The tests are already
there and they were not failing because "none" environment were added to
the hash. This environment is not a valid environment and it is on the
tests exactly to assert the behaviour that
default_middleware_by_environment always return an empty array for
unknown keys.
Merge pull request #712 from rafaelfranca/rm-fix-rails-server

default_middleware_by_environment should always returns empty array for unknown keys
Undo test that falsely exemplifies production env
Merge pull request #710 from rack/webrick-chunking

Monkey patch to fix WEBrick chunking semantics.
multipart content-type match now case insensitive

Closes #676

This may not be 100% to spec, but it is important for compatibility and should
not cause regressions.
Rack::Multipart::UploadedFile has file extensions

Tempfiles created for file uploads now have file extensions. This enables
certain use cases for users that are using file extensions as heuristics.

Closes #690
Raise specific exception if the parameters are invalid

There are some cases where we try to parse the parameters but it fails
with ArgumentError.

1. When the parameters come from the query string and contains invalid
UTF-8 characters. In this case we raise ArgumentError when trying to
match the key portion of parameters with a regexp.

2. When the parameters come from the request body and the query string
contains invalid % encoded string. In this case we raise ArgumentError
when calling URI.decode_www_form_component.

Now both cases raise a InvalidParameterError what inherit from TypeError
and we can catch this exception to show a bad request for users instead
of an internal server error.