[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
This is the build as is: https://travis-ci.org/GrahamCampbell/framework/builds/31694207.
This is the build with the change: https://travis-ci.org/GrahamCampbell/framework/builds/31694254.

```
There was 1 failure:

1) SupportCollectionTest::testGettingMaxItemsFromCollection

Failed asserting that null matches expected 4.
```