Unified theory of double twinning in magnesium confirmed by experiment