issue #20815: pagination and full-test search support for REST server

Note that I've made the assumption that pageToken is 0-indexed, so pageToken=2 would give you the third page. This would be easy to fix if we want it the other way.