Fix user api

Still working on making search_lucene use more of the appframework...

b3106c3 is self-explanatory and was overlooked in https://github.com/owncloud/core/pull/9546
8189292 is a little trickier. Without it the getUserFolder will try to look up the userid via OC::$session which (at least here was somehow replaced with an empty `OC\Session\Memory` instance) The commit changes the lookup to use the UserSession service that has bee ninitialized in the servercontainers constructor.

cc @DeepDiver1975 @icewind1991