Declare and document getthrid()

indirectly prodded by krw@
They're thread IDs, not PIDs.  The wording is a bit clunky, but closer
to the truth