restful: addition of `validate` function in RestfulPagination

* Adds a `validate` function in RestfulPagination class that checks
  the ranges of `page` and `per_page` parameters.

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>