ensure addAtom updates chargedAtomsList correctly 

[#57522266]

The "did the charge on atom i change?" test fails if there's a leftover value in charge[i]; there can be such a value after a reset or history state change.

Because we're using typed arrays (which cannot be resized and cannot contain undefined or null), the only practical solution for dealing with leftover values in the various property arrays is to use careful accounting.