add new defaultUser logic which should be sane

Easy to customize, too.
fix bug in event streams: defer binding end event

There is an 'end' event which signals that processing this event
stream is done, and the user's callback should be called with the
result.  It had an annoying and buggy behavior which caused
asynchronous event processors' output to get lost in the resulting
stream.  This was happening because it was possible for processors to
be appended to the event stream after we start looking for the end
event.

Moving the end event subscription to just before the input processing
starts ensures that all event processors will get their changes
included in the pipeline.
rotate logic to use event processor

This makes it easy to customize, eg for Tidepool's purposes.