Emit old sharing hooks

Conflicts:
	lib/public/share.php
Perform update only once
Smarter share updater to handle reshares

Conflicts:
	lib/share/updater.php
Be more careful with variables in getHookArray
Fix searchForParents
Remove unused variable
Always use search method through Group Manager, fixes #4201