NeuZip: Memory-Efficient Training and Inference with Dynamic Compression of Neural Networks