Andy Murray produced his best clay performance to beat Rafael Nadal 6-3 6-2 and claim the Madrid Masters.