Joe McElderry wins UK X Factor final