Dynamics of pion double-charge-exchange reactions