MatFormer: Nested Transformer for Elastic Inference