Simona Halep overcame a defiant Sloane Stephens to win the Rogers Cup and claim her third title of the year.