Allow specification of the time unit of TimeStat

TimeStat allows the time unit to be specified when adding a sample to the
distribution but when queried returns data implicitely converted to seconds.
This diff allows the time unit to be specified when a TimeStat is created
causing the returned data to be converted to the given unit.