Stabilization of bubbles and foams