Tysk metallindustri har inngått en pilotavtale som dekker 1,7 millioner arbeidere, inkludert lønnsøkninger og midlertidige arbeidstidsavvik.