The mass distribution of Galactic double neutron stars: constraints on the gravitational-wave sources like GW170817