API: updated to ss 3.1

because of the radical API changes in 3.1 modules that use any silverstripe statics (like $db) can no longer be compatible with 3.0 and 3.1 at the same time.

therefore I suggest creating a 3.0 (name can differ, but I have seen other modules use 3.0) branch from the current master
and after that merge this pull request to make branch master compatible with silverstripe master