The transition radiation detector of the PAMELA space mission