Compactness Conditions in the Theory of Nonlinear Differential and Integral Equations