fix($interpolate): use the first end symbol that forms a valid expression

When an interpolation string has multiple end symbol choices, pick the
occurrence that forms a valid expression

Closes #8642
The suggested code will fail with `$interpolate('{{"\\}}"}}')`, anyhow it is possible to fix it, but it does add some other oddities