Ab initio study of the electronic structure of the molecule-based ferromagnet Co[N(CN)2]2