Fixed problems of error 404.

refs #1105 #1396
When exactly is this called? How can I test it?

We have two methods to render 404 pages now: `ApplicationsController#render_404` and `ErrorsController#render404`. I'm trying to see the difference between them.