string.c: fix wrong single-byte optimization

* string.c (rb_str_count): fix wrong single-byte optimization.
  7bit ascii can be a trailing byte in Shift_JIS.
  [ruby-dev:48442] [Bug #10078]

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