Include part of last group to aggregation

If the last group doesn't completely
fit the rest of aggregation window,
include part if it to the aggregation result.

Also use period as is to calculate
local date group splits instead of milliseconds.

Test: atest CtsHealthFitnessDeviceTestCases
Bug: 282745804

Change-Id: I94b08043b6e04b9cb470e965a2b77859ec102b67
5 files changed