Fix some problems with draining callouts / taskqueues.