REF: de-duplicate get_resolution
This changes get_resolution to use the same less-verbose pattern as ints_to_pydatetime; hopefully we'll be able to refactor out a couple of helper functions. 

asv run says this is perf-neutral