restful: addition of validate method

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

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>
jsonalchemy: fix problem with reserved names

* Addresses issue when `try_to_eval` function was evaluating missing
  subfields to existing global Python functions.  (closes #2593)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>