Encapsulate api results in an object.

This lets us access them as either Arrays or Objects. Also provides
a simple (untested) API for cancellation.

Change-Id: Iafdcc85d8c8ac030873bfe4e7f3675e8c868c45f