Defect-Level Switching for Highly Nonlinear and Hysteretic Electronic Devices