TMDM-7548: "Statistics rest services enhancement"

Minor code enhancements for TimeSlicer.
Adds unit test for TimeSlicer.
(https://jira.talendforge.org/browse/TMDM-7548)