A Review of Resistive Switching Devices: Performance Improvement, Characterization, and Applications