Remove references to threads subsystem and cleanup threads tests