controller: Close the router client after use.

Signed-off-by: Blaž Hrastnik <blaz.hrast@gmail.com>
controller: Properly handle errors on using multiple router clients.

Signed-off-by: Blaž Hrastnik <blaz.hrast@gmail.com>
fixup! router: Drain hook in the API.
cli, controller: Refactor drain stream to be a long-running http request.

Signed-off-by: Blaž Hrastnik <blaz.hrast@gmail.com>
sse: Trim trailing newline from the received data.

Signed-off-by: Blaž Hrastnik <blaz.hrast@gmail.com>