Juan Martin del Potro recovered from an early injury scare to beat David Ferrer in straight sets in the Wimbledon quarter-finals.