Adds check against metric data cache corruption.
Adds delete/insert behavior to updateByStates if value is null or execution affects zero rows.
RecalculateTask now better detects if it has never executed before and should recalculate all.
Adds a Stats call to RecalculationTask.
Delays reference resolving during RecalculationTask#recalculate.