Fix a crash in thread_suspend_func () if the thread has no tls set.
Fix the dependencies of the corlib test suite so the test suite is not rebuilt every time.