NbO2-based locally active memristors: from physical mechanisms to performance optimization