made memory allocator for qgram-like distances thread-safe
paralellized stringdist/qgram