Solid-electrolyte nanometer switch