Move ajax calls in versions app to OCS API calls

Added OCS API calls for the versions app and make the JS side use them

Fixes https://github.com/owncloud/core/issues/10571
The GET call is the previous one.
Here you're looking at the "revert to old versions".
@Raydiation suggested using "POST" for such custom operations, so I internally added a "action" parameter that you should set to "revert" for now.