On the connection between the metal-enriched intergalactic medium and galaxies: an O VI-galaxy cross-correlation study at z < 1