Add an idle callback, to be used while waiting for activity.

The PR title says it all. I use this idle callback to do some processing while waiting for more data.
I apologize for being so horribly slow in responding to this PR.

If the callback isn't set yet (ie, just `private $idleCallback;`) won't this call throw some kind of exception?