Thermodynamic perturbation theory for association into doubly bonded dimers