Certain bundles require multi-line matches in the firstLineMatch
value so count the number of newlines in the regex and only test
the regex against only those lines.
This is required for the property-list bundle to highlight
.plist files that maybe in XML or non-XML formats.
Also specify the cached buffer disk contents to grammarForFilePath
so fs.read doesn't need to be called again if the contents are
already read.
This makes the scoped property system mimic the behavior of CSS. When
there is a tie, the scoped properties loaded later in the cascade win.
I also optimize the scanning of all the properties, checking only those
sets of properties that have a value for the desired key path, to reduce
the need to match a ton of scope selectors.
We'll store all syntax-related global state in the `syntax` global. For
now, this means that all scoped properties will be stored here, as well
as all grammars.