Spectroscopic survey of the Galaxy with Gaia– I. Design and performance of the Radial Velocity Spectrometer