Magnetic-field-induced quantum phase transitions in the two-impurity Anderson model