[SATYR PATCH 3/6] python: base classes for threads and stacktraces