On the quasi-static and dynamic crushing of random foams