Fixed bug in replica exchange

I fixed a bug occurring when using replicas with different
Hamiltonians (either lamdba dynamics or plumed -hrex branch).
The acceptance was wrong when using a CV that depends on charges
or masses (if charges or masses were changed in the Hamiltonian,
respectively).
changelog