A threat from Iran against Donald Trump led to increased security in the days before a July campaign rally in Pennsylvania, where he was shot in the ear.