High-mass binaries in the very young open cluster NGC 6231. Implication for cluster and star formation