This is a re-submission of 24d24055 without the hunks in HostNativeThreadBase.{h,cpp}, which break builds on Windows. Identified with modernize-use-nullptr.