vppinfra: improve timebase resilience
vppinfra: improve timebase resilience

Deal with arbitrary kernel reference time changes: for example,
yanking the kernel reference clock back to a time before vpp started.

Best practice involves aligning the kernel reference clock with
reality prior to starting apps which use 10us granularity timers.

Compute change in the reference and cpu clocks. Recompute the vpp
start time reference and and total cpu clock count, using the current
clock tick rate.

Next, compute a new clock rate sample. If the sample seems sane,
factor it into the exponentially smoothed clock rate and recalculate
total cpu ticks based on the new clock rate.

Type: fix

Signed-off-by: Dave Barach <bfcdf3e6ca6cef45543bfbb57509c92aec9a39fb@barachs.net>
Change-Id: Ib6132ffbbe0e6d140725676de5e35be112a31dfe

chrisy/vpp,FDio/vpp,FDio/vpp,FDio/vpp,FDio/vpp,chrisy/vpp,chrisy/vpp,FDio/vpp,chrisy/vpp,FDio/vpp,FDio/vpp,chrisy/vpp,chrisy/vpp,FDio/vpp,chrisy/vpp,chrisy/vpp