Protection of pipes or pipe fittings against corrosion or incrustation by means of internal or external coatings