Measurement of the neutrino velocity with the OPERA detector in the CNGS beam