The results cap a historically tumultuous and competitive election season that included two assassination attempts targeting Trump and a shift to a new Democratic nominee