Convert Time, Date, and DateTime objects to integer timestamps

This seems like the right behaviour, since Customer.io always wants timestamps as integers.

Also includes a little change to a test that seemed like it would otherwise break if the clock ticked at the wrong time.