Use Period objects for representing time settings

This lets us basically avoid having to track whether these have been
parsed/munged and what their units are, because we can just check that
they're Periods. It also lets us simplify a bit of code turning them
into seconds unnecessarily.