Added page and max pages fields to thread resource.

This way we can get pagination data.