[lib/cleanup] Use a typedef for the thread type

* lib/thread.{c,h}: As per subject. This will avoid head-scratching for next
  person who adds a thread-type and gets strange breakage.
2 files changed