Adil Rashid kept alive Yorkshire's hopes of success with three wickets on day three against Durham at the Riverside.