add stream and pagination for contacts

``write_objects`` intentionally uses newlines.

The idea is that for streaming you want multiple JSON objects returned, not
one, because one can't pass 10GB of contact data to a JSON parser and
expect that to work. So clients split the stream on newlines and then parse
each JSON object individually.