change order of registering api and capabilities to fix file version previews

When registering an api call the collection gets set to
```php
			OC::$server->getRouter()->useCollection('ocs');
```
My guess is it does not get reverted so when the next create rout call is executed is goes into the wrong collection. Fixes 

@PVince81 @icewind1991 @schiesbn a quick review please.
because of $collectionName being initialized with null, null could be passed into useCollection() - I doubt this is giving us the right behavior.

@butonic