A bunch of changes to get to a point where push and pull over http both work, meaning they transfer the requested blocks and don't hang. Much cleanup is needed, but now we can start from working and have tests to run as we refactor.
Rename enqueuing to enqueueing and add source enqueueing, which was missing
Rename ShouldClose to IsSafeStateToClose, and define for source, including the new enqueueing state
Wrap filterAllocator result in SynchronizedFilter to avoid race condition
Remove SynchronizedFilter wrapping from NewSimpleStatusAccumulator call, since it already has mutex logic have.Copy to avoid race condition
Other race condition fixes
Move where we notify BEGIN_FLUSH and END_FLUSH, to avoid BATCH being nested within it only for http but not for others. Led to some ugly hacks that need cleanup, but starting here with "it works" before cleanup.
Add AllDone to be able to wait on all responder sessions.
Add necessary logic for conditional flush
Remove state from messages
Add responders to http server, for the current idea that responder sessions aren't truly sessions, they're request handlers.
Update event loop logic to close the "session" after responding, since no more processing is possible with no request to respond to. Streaming will need to change this of course.
A bunch of changes to get to a point where push and pull over http both work, meaning they transfer the requested blocks and don't hang. Much cleanup is needed, but now we can start from working and have tests to run as we refactor.