Set the thread name for the stats thread if a thread name prefix is given.