Stop using static buffer in TextDict::LoadFromFile to fix multithreading issue and add unit test