Add REST route for managing groups and users

First step of a somewhat testable user management. - I know, the JSON returns are in an ugly format but the JS expects it that way. So let's keep it that way until we have time to fix the JS in the future.

Todo (group):
- [x] Migrate get handler (index)
- [x] Migrate create handler (create)
- [x] Migrate destroy handler (destroy)
- [ ] ~~Add possibility to rename group (update)~~ (requires more work - let's do this later)
- [x] Write unit tests  
- [x] Fix for subadmins

Todo (user):
- [x] Migrate get handler (index)
- [x] Migrate create handler (create)
- [x] Migrate destroy handler (destroy)
- [ ] ~~Add possibility to manage users (update)~~ (requires more work - let's do this later in single steps instead one large one…)
- [x] Write unit tests
- [x] Fix for subadmins

FIXME:
- [x] Fix JS code for deletion of groups

Requires https://github.com/owncloud/core/pull/12619

@MorrisJobke 
See comments for GroupsController which also apply here. (rename "index" to "list" and check HTTP return codes)