Fix parsing of raw strings containing unclosed parentheses and brackets

Strings like `r'['` and `r'('` were causing the rest of the document to be parsed as if it were inside the regex. Now we terminate the regex at the closing quote in all cases.

This is a backport of https://github.com/textmate/python.tmbundle/commit/2567262452b389f7042ef3026e0443f6336d1735

/cc @vmg
This will combine to a single object with duplicate `include` keys when compiled to JavaSript:

```js
'patterns': [
    {
      'include': '#constant_placeholder',
      'include': '#escaped_unicode_char',
      'include': '#escaped_char',
      'include': '#regular_expressions'
    }
  ]
```

You probably want it to be:

```coffee
'patterns': [
  {'include': '#constant_placeholder'}
  {'include': '#escaped_unicode_char'}
  {'include': '#escaped_char'}
  {'include': '#regular_expressions'}
]
```