Implementation of celery stats for active, pending and done tasks.

this function doesn't get_done_tasks it just adds extra information, not a great name