Make asBroadcastStream take two callbacks.

These callbacks will be called when the broadcast stream no longer
has any listeners, or when it gets a listener after having none.

The callback is provided with a StreamSubscription-like object where
it can pause/resume/cancel the underlying subscription on the original
stream.

BUG=http://dartbug.com/11289
R=floitsch@google.com

Review URL: https://codereview.chromium.org//17490002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/logging@24776 260f80e4-7a28-3924-810f-c04153c831b5
1 file changed
tree: ab90d0433aeaa0f10f75e4ecdeaf7d9cf59d6c49
  1. lib/
  2. test/
  3. pubspec.yaml