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