QueueStats: Use task ids instead of counts

There are couple of bugs in core which makes it possible to call
the functions provided by TaskParker in out of order. To no mess
up the counts for such cases, use task ids instead of monitoring
the count of tasks.

Change-Id: Ic1341a998f9c26658366404e9d1ea710237e9851
5 files changed