First-Principles Plane-Wave-Based Exploration of Cathode and Anode Materials for Li- and Na-Ion Batteries Involving Complex Nitrogen-Based Anions