Poll the API for the CSV export

Supports the API's mechanism for background jobs.

Depends on localdata/localdata-api#207.

/cc @hampelm