Competition of the antiferromagnetic superexchange with the ferromagnetic double exchange in dicobalt complexes