Rafael Nadal moved a step closer to a sixth Madrid Open title as he beat Alexei Popyrin in straight sets to reach the quarter-finals.