fix #7248: throw boundserror for invalid indices in ind2chr/chr2ind

Fixes #7248.  Previously, `chr2ind` and `ind2chr` performed no bounds checking for `DirectIndexString`s.  Now they throw a `BoundsError`.

Also, for other string types `chr2ind(s, i)` threw a `BoundsError` for `i` too large but silently returned the value for `i < 1`.   I don't understand why this behavior was desirable, so I changed it to throw a `BoundsError` in both cases.
This feels sketchy to me, although I guess it's probably ok. It seems to me that explicitly checking that

```julia
start(s) <= i <= endof(s)
```

would be better. If actually fetching the character is expensive, this could be bad. I'm thinking hypothetical distributed string or a string with mmapped data. Yes, it's slightly far-fetched, but checking the range is easy enough.