Fix stripConstantEndpoints in strings rewriter (#2883)
`TheoryStringsRewriter::stripConstantEndpoints()` returns the stripped
endpoints in the vectors `nb` and `ne`. These endpoints were not
computed correctly if string literal had to be split. For example:
```
stripConstantEndpoints({ "ABC" }, { "C" }, {}, {}, 1)
```
returned `true` and only "A" for `nb` (instead of "AB") because we
mistakenly used the amount of overlap between "ABC" and "C" (which is
one) for the length of the stripped prefix.
This commit fixes the issue and adds several unit tests.