Convert attachment metadata from es to archivant format

            This function makes side effect on input attachment

def normalize_attachment(attachment):
        ''' Convert attachment metadata from es to archivant format

            This function makes side effect on input attachment
        '''
        res = dict()
        res['type'] = 'attachment'
        res['id'] = attachment['id']
        del(attachment['id'])
        res['url'] = attachment['url']
        del(attachment['url'])
        res['metadata'] = attachment
        return res