Improve cookbook entry for error pages in 2.3+

This PR cherry-picks the improvements from #4293 that apply to 2.3 as well (almost all!).

It also addresses some of the considerations in #4181. 
it has a low priority (meaning that registering your listener with the default priority of 0 will make it run before the core one). But it is not the lowest-possible priority (it is possible to build lower integers in PHP, as we are still far from ``- PHP_INT_MAX``)