kill OC::$session

maintain deprecated \OC::$session when getting or setting the session via the server container or UserSession

restore order os OC::$session and OC::$CLI

remove unneded initialization of dummy session

write back session when $useCustomSession is true

log warning when deprecated app is used
be correct in deprecation documentation
Merge pull request #9681 from owncloud/kill_oc_session

kill OC::$session