Display diagnostics in text format for xhr request

When ActiveRecord::NotFound is raised in controller's - detailed exception (xhr.responseText) is rendered like this:

```
<header>
  <h1>
    RuntimeError
  </h1>
</header>

<div id="container">
  <h2>puke!</h2>

Rails.root: unset

Application Trace
/Users/razum2um/Code/rails/actionpack/test/dispatch/debug_exceptions_test.rb:60:in `call'
/Users/razum2um/Code/rails/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
```

This fixes it by using standard .text template
Initial idea in #11960