Active Set and Generalized PAVA for Isotone Optimization