[WIP] Move ajax calls in versions app to OCS API calls

:warning: work in progress :warning: 

Added OCS API calls for the versions app and make the JS side use them

Fixes https://github.com/owncloud/core/issues/10571
I prefer to pass this directly in the URL and not use GET parameters - see https://github.com/owncloud/core/pull/11009 for an example.