President Trump’s speech in Pennsylvania was meant to alleviate concerns about affordability. But he kept wandering off script and dwelling on his favorite targets, like immigration.