Refactored the to_timeseries method and tests

The to_timeseries now uses the resample method instead of asfreq.
Added basic test to handle the to_timeseries method