An X-ray spectroscopic study of the pulsar 1E2259+586 and the supernova remnant G109.1-1.0 (CTB 109)