Add a new helper function set_new_state() to set the state for the next minute.
Add a helper function to reset the frequency to the one passed in the configuration file.

Only write the '>' if the frequency is too high.
Fold lines while here.
Reset the frequency when two consecutive minute markers come in,
and reset the EOM flag in this case.

Observed during a thunder storm when realfreq dropped to 600 Hz and
t(otal) had risen to 1200 Hz, giving constant EOM markers until
realfreq dropped below the lower limit.
Defer assigning the decoded time until the minute length has been checked
to match the exact expected value (i.e. 59 unless a leap second occurs).

This (significantly) reduces the amount of false time jumps in case a bit
gets split up due to a reception error.
Code cosmetics.