The battle to achieve a majority 270 electoral votes has been so close that knowing the winner could take until into Wednesday or even longer, and lead to legal battles over the vote count.