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. 
>
1) Customize Error Templates

I like including the numbers when you have a mini-table of contents like we do here. In fact, I really like how you organized things. We could even link the above lines down to each section.