[stable5] External storage SMB fixes for stat and unlink backport

Backport of https://github.com/owncloud/core/pull/5878 to stable5

@ser72 maybe you can test these fixes on OC5 here until we get the OC6 mounting issue sorting out.

CC @icewind1991 @karlitschek @DeepDiver1975