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