Donald Trump’s election spells doom for Barack Obama’s legacy