Automated simultaneous analysis of anions and monovalent and divalent cations