Modify TSDB.collectStats() to return the used and available UIDs as per isavin's
work on #153