CLEX: Continuous Length Extrapolation for Large Language Models