Measurement of atomic capture probabilities of negative pions in metal hydrides