First example of dependency injection in models

the rest of the models will be changed accordingly, after that the Api class will no longer have static methods for get() et al
after that we can finally properly mock them in tests
Merge git://github.com/Graylog2/graylog2-web-interface into develop