Raise generic ParseError exception when ActionDispatch::ParamsParser fails parsing request params and failure to parse params should trigger a 400 Bad Reque

This pulls in rails/rails#7444 and rails/rails#9857, which are present in Rails 4, but not Rails 3.2.

Fixes harvesthq/harvestapp#2429

Before, when a client sent invalid XML to harvestapp, a Nokogiri error would be sent to Errbit and
a 500 error would be shown to the client. With this, a 400 error is shown and no error gets logged
to Errbit.