Fix scope issue on "%}" for certain tags

Tags which contained more than just a name in their usage would lose
scope attributes intended for the "%}" operator.
Add basic folding

Includes custom explicit folding markers like C# "regions".  A region
is started with "{# region[ name] #}" and ends with "{# endregion[
name] #}".