Centroid_peaks now applied correctly

These changes allow to apply the centroid_peaks function without altering the m/z and the intensity in an unwanted way.
There is lost data points when applying the function compared to the previoous (but buggy) version but it should not be a problem because these points where erroneous.