Learning Versatile Skills with Curriculum Masking