Added pagination + reference resolution

This PR proposes:

* methods to get the next and previous page from a bundle of search results
* methods to resolve references (contained, in-bundle, and from a remote server), synchronous and async