Update thread.hh

Added method hasTid(), makes even more beautifull.