Upgrading Electroresistive Memory from Binary to Ternary Through Single-Atom Substitution in the Molecular Design.