British number one Andy Murray has won his second Queen's title after beating Jo-Wilfried Tsonga in three sets.