Add new sampling profiler and make threadsafe for python27/multithreading