Remove trailing whitespaces
Introduce ObjectDatabase.CalculateHistoryDivergence()

Fix #562