test new optimizations for redefines

* test/ruby/test_optimization.rb (test_string_freeze): new test
  (test_hash_aref_with): ditto
  (test_hash_aset_with): ditto

Our new (in 2.2) optimizations must not trigger when redefined.

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