Britain's Andy Murray won the AEGON Championships for the third time with a three-set victory over Croatian Marin Cilic in the final at Queen's.