Generate etag when missing

Tentative fix for https://github.com/owncloud/core/issues/12172

Note: this doesn't cover all code paths, only the ones that explicitly request the file's metadata (PROPFIND)

Please carefully review @icewind1991 @DeepDiver1975 
I could group this with the permissions update above but I think this should happen seldom anyway, so an extra update should be fine.