Properly track offsets for multiline regexps in Find/Replace in Files

For #8162.

@peterflynn - note that there are a couple of cases here in calculating the end offset properly (since you need to only take the length of the last matched line into account if there are multiple lines). I added unit tests for a few different cases - let me know if you think there are some that I missed.

Also, note that we don't actually display all the matched lines in the results view. Do you think we should fix that as well?
Do you think the first case would be clearer as just `ch + matchLength` as in the original (since there's only one line involved)?