Consolidate has_metadata and has_file_datastream into contains. Fixes #508