server: Flush headers when using wait=true and stream=true

Many http clients will missbehave unless the get an initial http-
response with headers, even when long-polling. It also saves the
user from havng to handle headers on the first action of the watch,
but rather handle the response immediately.