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.