England stun Pakistan in second Test to level series