England swung the ball prodigiously to dismiss Pakistan for 174 at Headingley before ending the day in a strong position on 106 for two