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.