core: add `thread_get()`

Remove PID check duplication in `thread_getstatus()` and
`thread_getname()`.
pyterm: fix exit behavior if twisted is not available
Merge pull request #1582 from N8Fear/fix_pyterm_twisted

pyterm: fix exit behavior if twisted is not available
Merge pull request #1580 from Kijewski/thread_get

core: add `thread_get()`