[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
+1 if they did its going to be a huge pain in the neck