Introduce hysteresis when changing frequency ranges

When measuring a frequency near 1000Hz, the displayed frequency
would shift if the frequency slightly varied. Example:

"999.9Hz"
"1.000kHz"

That shifting would make it harder to read out the frequency
value. Introduce hysteresis so that we don't shift down to
a lower frequency range until the frequency has dropped
significantly. Example:

"0.999kHz"
"1.000kHz"

Also right justify the frequency display to avoid shifting
for frequencies around 1, 10, and 100 Hz:

"  99.9Hz"
" 100.0Hz"

The idea to use hysteresis was kindly borrowed from HP's frequency
counters as described in the May 1969 issue of Hewlett-Packard
Journal.