Australia's Stephanie Gilmore has won a sixth world surfing title in a dramatic climax to the 2014 women's tour in Hawaii.