Achieving Tokenizer Flexibility in Language Models through Heuristic Adaptation and Supertoken Learning