Tim Bresnan led the way as Warwickshire pulled off a stunning victory on the final day of their LV= Insurance County Championship match at Trent Bridge.