Device for controlling gaseous exchanges between the inside and outside of a container for solid or liquid food products