Fifth seed Rafael Nadal overcame the stubborn challenge of France's Benoit Paire to progress to the last 16 of the Madrid Open.