ntp: define NTP_MAX_STRATUM for other modules
ntp: merge broadcast code with ntp_core
ntp: fix Clang warning
sources: update reference only with new sample

This follows the section 11.2.3. from RFC 5905.
sources: keep synchronized status with unreachable/unselectable sources

Following RFC 5905, don't call REF_SetUnsynchronised() when there are no
reachable or selectable sources. It's up to the client to consider the
source unsynchronized when the root distance exceeds a threshold.

The unsynchronized status is still set when no majority is reached.
sources: reorder SRC_SelectSource()

Reorder the code to improve readability and also update coding style.
No functional changes.
sources: drop selectable flag

This is no longer needed with new NTP packet processing as the sources
are always selectable after first sample is accumulated.
sources: select only when reference can be updated

Before selecting the new synchronization source wait until the reference
can be updated, i.e. the source has new samples.
sources: fix reported normal select option
sources: extend source status tracking

Add new source states and rename some states so there is one state for
each reason a source can be rejected in the source selection.

This fixes reported status when sources are selectable, but the actual
selection was postponed until next update. It will also allow more
detailed reports when the cmdmon protocol is updated.
sources: allow selection of unreachable sources

Reachability is no longer a requirement for selection. An unreachable
source can remain selected if its newest sample is not older than the
oldest sample from all reachable sources.

This is useful to prevent reselection when an accurate source uses a
very short polling interval (e.g. refclock) and is occasionally
unreachable for short periods of time.
sources: reset reachability for offline sources

With the recent change allowing unreachable sources to remain selected,
offline sources will now be selectable only for some time, similarly to
online unreachable sources.
sourcestats: reduce debug messages in slew handler
ntp: remove debug messages in slew handler
test: add option to create falsetickers
test: add 009-sourceselection