Efficient and Accurate Modeling of Multiwavelength Propagation in SOAs: A Generalized Coupled-Mode Approach