Accretion geometry of the black-hole binary Cygnus X-1 from X-ray polarimetry