ZEN-7474: (changesets 75150, 75300) validate state of event_summary tabl...

...e on startup and before optimization.