Support existing sessions within OCS API calls


This will allow us to use the OCS API within an existing session - required for mobile and desktop client.

@karlitschek @bantu