The XMM deep survey in the CDF-S. II. A 9-20 keV selection of heavily obscured active galaxies at z>1.7