Add timed flags display to character flag screen.
Factor out check_state().
Finish stage 0 of the refactor - move some stuff from cmd-cave.c to better places.