Switch to public OCP API

Change use of core functions to the public OCP API using the following script:
https://gist.github.com/ogasser/6833462

Fixes owncloud/apps#1236
Merge pull request #4 from owncloud/switch_to_public_ocp_api

Switch to public OCP API