Added code for diagnosing problems with the sampler

For the first run, it appears like we're getting stuck at a local
optimum and never emerging. That suggests doing something like multiple
restarts.