Victoria Azarenka has won the Qatar Open for the second year in a row after defeating Serena Williams 7-6 2-6 6-3 in a hard-fought final.