Added iterative sampling.

I moved most of `sample()` into `iter_sample()` (open to name suggestions). `iter_sample()` can be used in a for-loop. This is useful for convergence checking and animated plotting during sampling.

`sample()` now just loops over `iter_sample()`. I'll wait for the tests to see if that impaired performance somehow.