Optimal Transfer Operators in Algebraic Two-Level Methods for Nonsymmetric and Indefinite Problems