Feat/sample until converged

Added basic support for continuing sampling until some convergence criterion is met.