The 'total' struct and 'm' array in struct reliability were allocated once
per case group, but freed exactly once. If there were no case groups,
this caused a null dereference. If there was more than one case group,
this caused a memory leak. This commit fixes both problems.
This commit also fixes a related crash on bad syntax due to dereferencing
a null pointer in reliability_destroy().
Bug #38660.
Reported by William Rogers.