Changed analysis so that data are accumulated in update()

(backported from master).

@gtribello you might want to check if this is ok.
Notice that without this fix histograms accumulated in a replica exchange
simulation would include also data from other replicas, which is a bug.
I thus think this commit should be applied also to v2.0 and v2.1.

(cherry picked from commit 69578b2d34e60742372c713c8a3da7e51324ef06)
changelog
Merge branch 'v2.0' into v2.1