Fixed folder icon update routine when share owner exists

Whenever a folder has a "data-share-owner" attribute, the icon is now
properly updated to a shared folder icon.

Fixes https://github.com/owncloud/core/issues/9352

Note: the actual fix is on one line, everything else is just unit tests :smile: 

Please review @icewind1991 @schiesbn @purigarcia @MorrisJobke