thread.c: fix dynamic symbol keys

* thread.c (rb_thread_variable_get): fix dynamic symbol keys.
  rb_check_id() returns non-zero only for static symbols, whereas
  thread local variable keys can be dynamic symbols.
  [ruby-core:67185] [Bug #10667]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e