pthread: migrate unit tests to pytest test app Closes IDF-5600 See merge request espressif/esp-idf!20188