A joint spectro-imaging analysis of the XMM-Newton and HESS observations of the supernova remnant RX J1713.7-3946