MeasuringListener now uses a resulotion to determine when to measure.

This allows the listener to use only as much computational power as
needed. Measurements are still taken before the first and at the
last iteration.

Small bug fix in new work in TuningProblem.