Threads.cpp: Add API to base class to request thread to exit