An exceptionally bright flare from SGR 1806–20 and the origins of short-duration γ-ray bursts