Generalized Ordinary Differential Equations in Abstract Spaces and Applications