untested refactoring of metadata handling for s3 backend [ci skip]
untested refactoring of metadata handling for s3 backend [ci skip]

This tries to reconcile the changes in metadata handling as reflected
in the filesystem backend for the s3 backend.

Needs testing and further maintenance for back-log of s3-related
issues...

informatics-isi-edu/hatrac,informatics-isi-edu/hatrac