Megalodon: Efficient LLM Pretraining and Inference with Unlimited Context Length