England seal Pakistan series with three-wicket win at Trent Bridge