[PLAT-3965] Don't allow the database clock to run backwards

Cherry-pick fix from v2.0.1 branch.
Reviewed-by: Stephen Colebourne