High-precision timing of 42 millisecond pulsars with the European Pulsar Timing Array