fix bug for computing ttl on tagged data points

This commit also includes a big reactoring in the tests that verify TTLs. It
removes the Thread.sleep calls which were slowing the tests down considerably.
It also makes the tests more flexible because you can now write the data into
the past in order to simulate an updated TTL. For example, suppose we are using
a TTL of 7 days. If data was written 2 days ago, then the TTL would now be five
days.