Get version/caps at login time

Uses the cloud/capabilities OCS API to get information about the
server's capabilities.

The version number is now used to detect if the OC version is supported.
If OC 5 is found, it will turn on the session workaround (reauth for
every request). This makes it possible to remove the "single_session"
constructor argument.