[overlay] Fix Foundation extensions to Substring
When a substring gets bridged to NSString, it loses the initial offset,
therefore APIs that accept or return StringIndex ranges should handle
this case explicitly by adding/subtracting the substring start offset.
Fixes <rdar://problem/33873277>
(cherry picked from commit 7322b63c4495e3b32f8197fd26307f948f7b3148)