Dust-to-metal ratios in Damped Lyman-α absorbers: Fresh clues to the origins of dust and optical extinction towards γ-ray bursts