A mathematical model using stress-induced genetic variation mechanisms to prevent emergence of resistant bacteria