Add a avg_nsteps for DiffusionAnalyzer. Improved unittests.
Fix doc.