Return and use isPreviewAvailable for share previews

Since the mime type is known, now isPreviewAvailable is returned as well
and used by the JS side to properly render mime icon and previews.

Fixes https://github.com/owncloud/core/issues/9428
Or at least it prevents loading the preview when there is none.

Please review @schiesbn @MorrisJobke @icewind1991