The characterization of Virgo data and its impact on gravitational-wave searches