Minor consistency fixes to TaskStatsT.
Added additional unit test for populating a TaskStatsT object for a running task
Some SQL fixes to task history.
Removed