Handle bad URIs gracefully.

Some adapters (i.e. jruby-rack) will pass through bad URIs, then display
the resulting exception. This creates an attack vector for XSS attacks.
Return 400 instead of 404 in case of InvalidURIError
Include Content-Type in 400 response

To stay compatible with old Rack versions.
Update test 404 -> 400
Merge pull request #31 from gomore/master

Handle bad URIs gracefully