More than 140 countries have agreed to negotiate a legally binding treaty aimed at slashing the use of the metal mercury, with the goal of reducing people’s exposure to a toxin that hampers brain development among infants and young children worldwide.