web: Add Rest.poll() and req.cancel() req.restart()

Add Rest.poll() function for setting up a REST JSON poll. In addition
we add the ability to restart() requests and cancel() them. The latter
are neccessary to restart the requests that the poll() is watching,
with the same cookie.