Osmotic stabilization of concentrated emulsions and foams