Fixed issue in the way TuningProblem takes measurements.

TuningPromblem took measurements only after the target algorithm
has finished. This meant that it was incompatible with measurements
that needs information from the entire simulation run. This is has
now been solved with the use of MeasuringListener.

MeasuringListener is an AlgorithmListener that automatically takes
measurements throughout the execution of the target algorithm. The
final measurement can be retrieved afterwards.
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.