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?
`matchLength` really means `totalMatchLength` (it's not the first line length - it's the total length of the match across all lines, including newlines). But I think renaming it to that, and using that here, would make sense. I can tweak that.