Fix pt func
Created by: gcarleo
This fixes parallel tempering samplers when using generic sampler functions. The current implementation would return wrong samples when sampling from |psi(x)| rather than the usual |psi(x)|^2.
Tests for correct sampling are also changed to something more robust (power divergence tests are now used, including a set of chi-squared and log-likelihood ratios tests).