Events streaming

Currently we're periodically closing the connection to flush the events on the server. This PR intends to do away with the connection closing. The basic idea is to automatically flush events when either
* number of pending events reaches a preconfigured threshold
* or a pre-configured periodic flush timer fires

Two new tests for testing the two scenarios, include a lame streaming client since it seems to be nearly impossible to get the net.http client to flush a chunk of request body.

Two TODOs left over in 2 places suggesting more conservative memory management, see inline comments

Final note, adding new config params is messy. Maybe it's time to clean that up too?