Error controller to handle HTTP errors.

Fixes #310 and #257.

In this pull request:
I defined a new `ErrorRedirectException` that  can be used instead of `RedirectException` to change the controller withoud reloading the page with an HTTP redirect. 

I changed the `HTTPErrorException` to extend the new `ErrorRedirextException` and change the controller to the new `HTTPErrorController` as @VitSalis suggested in #257.

I also refactored the `ControllerBase`.
So that the return value of the `run` script is the return value of the dispatcher. This is how it was before; should we  change it?