Electronic structure and magnetic coupling of two dinuclear trigonal bipyramidal cobalt(II) complexes