vm_insnhelper.c: keyword hash functions

* vm_insnhelper.c (rb_extract_keywords, rb_check_keyword_opthash):
  extract from vm_callee_setup_keyword_arg.

* class.c (rb_scan_args): check if keys of keyword hash are symbols.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
dir.c: check unknown keywords

* dir.c (dir_initialize): check unknown keywords.  [ruby-dev:47152]
  [Bug #8060]

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