METAL: The Metal Evolution, Transport, and Abundance in the Large Magellanic Cloud Hubble Program. IV. Calibration of Dust Depletions versus Abundance Ratios in the Milky Way and Magellanic Clouds and Application to Damped Lyα Systems