Woakes, Buttler give England thrilling three-wicket win over Pakistan