[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
You can simplify this a little:
```php
return max(data_get($item, $key), $result);
```
If you want to ensure that you always return an integer, then cast it:
```php
return max((int) data_get($item, $key), $result);
```

Same goes for `min`.