Johanna Konta took the biggest title of her career with victory over Caroline Wozniacki as she became the first British woman to win the Miami Open.