replace min and max with minimum and maximum in cgdescent.jl

Replace some deprecated functions.