[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
@Anahkiasen , this failure would occur if I were using `$this->lists($key);` instead of `static::keyBy($key)->keys();`