Make min() and max() handle vector argument

This patch adds the ability for max() and min() to take one single vector as argument. The max (or min) element of that vector is returned if the vector contains at least one element.