Ignored exceptions don't behave as expected with exception chaining

It looks like the innermost exception is checked against `Bugsnag.configuration.ignore_classes` rather than outermost exception.

When a JSON parse error is thrown parsing a request in our Rails app we get the following exception chain:

* `ActionDispatch::ParamsParser::ParseError`
  * `MultiJson::ParseError`
    * `Oj::ParseError`

We only have `ActionDispatch::ParamsParser::ParseError` in our  `Bugsnag.configuration.ignore_classes` because we want to ignore JSON parse errors from request parameter parsing but not other areas of the app. Unfortunately this doesn't work since Bugsnag is checking `Oj::ParseError` (which we don't want to generally ignore) against the ignore list.