Avoid unnecessary catching of Exception instead of StandardError.

Cherry-pick of c9891608aa1e5ebbab04afe73bf7a28748001804
Conflicts:
	activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
	activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
Avoid unnecessary catching of Exception instead of StandardError (converting Exceptions into StandardErrors)

Conflicts:
	actionpack/lib/action_dispatch/middleware/params_parser.rb

Conflicts:
	actionpack/lib/action_dispatch/middleware/params_parser.rb
Merge remote-tracking branch 'github/3-2-stable' into 3-2-stable