Add LocalMinMax.hpp and tests