Performance of the Transition Radiation Detector of the PAMELA space mission