state iterator and logging for ConjugateGradient. Fixes #83.