Ben Stokes starred with 66 not out and 5-17 as Durham beat Derbyshire by 338 runs. The Division Two County Championship match finished inside three days.