A federal judge in the cases brought over water contamination in Flint, Michigan, threatened sanctions and a gag order after a defendant’s media campaign threatened a jury trial.