Add support for paginated contact retrieval.

Ah, thought this PR was ready for review, sorry.