computeESS function

Compute the ESS for the MCMC samples