Make the `ThreadImpl` a friend of the Thread class.

This allows the `ThreadImpl` class to call the `run()` method of the
`Thread` class without having the method public.

[ci skip]