vm_method.c: extract set_visibility

* vm_method.c (set_visibility): extract from rb_mod_public(),
  rb_mod_protected() and rb_mod_private().

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

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