add query string parsing

This patch uses the added query string parsing to find a value for `r` and pass
it along to `node/get-task`. The same is done for the `claim-id` and
`node/complete!`.

Additionally a bit of cleanup around `task/enqueue` is provided. However
currently this endpoint does not behave well when it encounters a missing body.
This should be fixed later.