Snow as a foam of ice: Plasticity, fracture and the brittle-to-ductile transition