Move time functions to timeutils.c

Move git_today, next_day, prev_day, same_day from curses_ui.c to
timeutils.c.