Del Potro wears down Federer to seal semi-final spot