Revert "replace localMaxima implementation, using dilation filter instead of own "algorithm""

This reverts commit 2c08217e5e452300817c9163cf9a1183840c8fb1.
dont duplicate values for localMaxima call
adapt key usage to given arguments
remove duplicated halfWindowSize tests
replace .stopIfNotMass* by .stopIfNotIsMass*
use direct return call