Add sanity check to TimeSeries* - provided end period must make sense given length of series
Modified stats funcs/queries to calc ts start/end dates correctly
Merge pull request #363 from reddmetrics/feature/fix-362

fixes for #362