Reliable gas sensing with memristive crossbar array