API: Refactor continuation code and add to purge, watch, etc.

While generator support was added to various actions, the continuation
parameters from the generators weren't being returned to the client.

This patch refactors the code for handling continuation out of ApiQuery
and into ApiResult, and then uses it in the other actions that need it.

Bug: 60734
Change-Id: I1a6e51cdc964ddcdd69aaa2f735223371233e8af
Merge "API: Refactor continuation code and add to purge, watch, etc."