Implement String#index, fixes #2073

See https://github.com/mruby/mruby/issues/2073