[4.2] Database Collection : move max and min functions

Move min and max functions so that we can use them in a "normal" Support\Collection
   $c = new Collection([1, 2, 3, 4]);
   max($c) => null instead of 4