Donald Trump has won the battleground state of Georgia, the once Republican stronghold that voted for Democrats four years ago.