scripts/metadata.pl: move parse_target_metadata() to metadata.pm