Optimize BasalUtil to be faster

New code also handles overlapping temps and expects data to come in sorted by time.  So, some tests were adjusted to accommodate those assumptions