Add manual folds array to ViDocument.

We initialize it with a null for each line when the document loads. This
array will be to keep track of user-set folds.
Add createFoldForRange: to ViDocument.

This registers a fold for a given range of content. Currently
it only deals with one level, setting a flag when there is a
fold. More sophistication to come.

Note that folds are linewise, so the range is resolved to a
set of line numbers and folding set on those lines.
Add zf and zF for setting folds.

zf[motion], zf in visual mode, and [count]zF work to set
a fold for a given range of lines.
Add foldRangeAtLocation: to ViDocument.

This function looks up the range of the fold at a given
location in the document. The returned range is from the
first character of the first line of the fold to the last character
of the last line of the fold.
Add ]z and [z for moving to the start and end of a fold.
Add ViFold object to track data about a fold.

Currently it has fields for range, open/closed status, parent,
and children.
Update ViDocument to use ViFold for tracking folds.

When creating a new fold for a given range, we merge folds
that overlap the new fold at the front and/or back. Still no
hierarchy, so we obliterate folds in between. More to come
on that front.
Implement ViFold's addChild: and removeChild:.

We use a mutable set to manage this, though the property
is exposed as a simple set to consumers.
Add depth property to ViFold.
Add two helper functions, addChildToFold and addTopmostParentToFold.

addChildToFold adds a given child fold to its parent.
addTopmostParent adds the topmost parent of a given child
fold to a given parent fold.
Add parent fold to ViFold description.
Implement nested fold management in ViDocument's createFoldForRange:.

Folds are appropriately updated given a new range to
create parents and children as necessary.
Actually return a value from move_to_fold_start/end:.
Rename isOpen property to open with isOpen getter in ViFold.
Add ViFoldedAttributeName constant.

This will be used to annotate attributed strings to indicate
that a certain range of characters should be folded, meaning
hidden.
Add ViTypesetter and ViGlyphGenerator.

These will be used by the ViLayoutManager to implement
folding based on the ViFoldedAttributeName attribute being
set to @YES.
No-op ViTextStorage's fixAttachmentAttributeInRange: method.

This method usuallys trips the NSAttachmentAttributeName
attributes from characters that aren't the special Cocoa
NSAttachmentCharacter. In our case, we'll be annotating the
first character of a fold with the attachment attribute and
display an image in its place.
Add closeFoldAtLocation: to ViDocument.

This can be refactored to be a little nicer than it is now, but it
works reasonably well. Multiple lines are folded to a single
line with a given attachment image to indicate the fold.
Other characters in the fold are hidden.

The method returns the range of the closed fold. Note that
this is NOT the same as the range of characters annotated
by the folded attirbute, as the fold range only extends to the
first character of the last line of the fold, while the actual
folding extends to the last character of the last line of the
fold.

Note:
 - the current implementation folds across all text views
   currently viewing this document
 - we're currently using a placeholder image (the tag icon for
   the symbol list)
 - movement keys and actions still move within the fold, but
   currently don't cause the fold to expand
Add zc command mode action to close a fold.

zo and friends to come.
Add zo action to open a fold.

This requires you to be within the fold range; the fold
character should be within that range, but currently isn't.
Since movement doesn't jump over the fold yet, you can just
move into the fold and apply zo to see it work.