Computational discovery of stable and metastable ternary oxynitrides.