Trump wins the White House in political comeback rooted in appeals to frustrated voters