Ensure page parameters are valid.

Fixes #2042 by ensuring that:

- Invalid numbers aren't passed through to logic layer or paginator
- There is a default should an invalid number is passed.

Adds a _get_page_number() to the BaseController for re-use in all the controller subclasses.
We're keen to avoid swallowing all exceptions, as this can end up hiding coding errors too. I suggest you just catch ValueError here.