Ab initio simulation of the structure and transport properties of zirconium and ferromagnetic cobalt contacts on the two-dimensional semiconductor WS2