Scott Borthwick's maiden County Championship century rescued Durham on day two against Warwickshire at Edgbaston.