agent: Document and implement cancelling of restjson requests.

Fixes #372
Closes #344

Reviewed-by: Stef Walter <stefw@redhat.com>
web: Tell the channel when a restjson request is cancelled.

Fixes #372
Closes #444

Reviewed-by: Stef Walter <stefw@redhat.com>