The entrepreneur had spent millions of dollars in a bid to tip the balance of the court in favour of the Republicans in a key battleground state,