ARMS-74 Record attachments in attachments.metadata

Keep a copy of attachment list in attachments.metadata to enable
retrieving the list without using Solr or not available, e.g. in
PDF transformer.