Replace all hard-coded occurences of user_id

It's better to use the explicit methods to get and set the user instead of fiddling with the session manually.

Related to https://github.com/owncloud/core/issues/12891 - first step to migrating the incognito mode. - More coming…

\cc @schiesbn @PVince81 
Should the result of getUser() be cached ?
I know the 3 extra function calls might not be muched, but if we consider that getUserId() is called often in lots of places...