Restructure base graft as a class, BaseGraft.

The goal of this is to set us up for extension via wrapping
the basic functions already in BaseGraft. In particular, this
allows adding decorations around the simple, functional,
stateless BaseGraft functions to add enhancements and,
where useful, state. For example, a knockout upgrade to
graft could insert or subscribe to observables as needed to
keep the tree structure updated live, without polluting the
markup on the page.