I just noticed that following updateMetadata() here leaves us with no way to delete metadata properties from the records.

Maybe instead, the return value from updateRecord should be the complete metadata object and you should just do dbfile.metadata = media.updateRecord(...);