Revert "fix sentinel write thread id for pthread platforms"

This reverts commit a892a9a7be47ceac32dbb51f342ead02fd65c986.
update thread id api, add InvalidThreadId constant