Properly register sharing hooks and proxies

This will fix failing tests when shares weren't cleant up on delete due
to missing hooks.

Added login for user1 in setUp().

@DeepDiver1975 @icewind1991 @schiesbn @LukasReschke 

Stable7 fix for the failing unit tests https://github.com/owncloud/core/issues/11854