Random perturbations in a mathematical model of bacterial resistance: Analysis and optimal control.