Justin Thomas won the World Golf Championships-FedEx St. Jude Invitational by three strokes, reclaiming the title of World No. 1.