The shock of Donald Trump’s victory seemed to overturn everything we thought we knew about presidential campaigning, especially the science of polling. In a year that appeared to belong to data nerds, armed with algorithms and demographic models, nearly every poll was wrong.