Rehan Ahmed takes five-for to help England close in on third Test win over Pakistan