Put getpages_data on a diet, and store all the important information
in the buf.

Suggested by:	kib
Sponsored by:	Nginx, Inc.