If the node id is set as the node name in the tree, make sure it keeps its brackets
rename and check for itext on the second condition
===
yeah, of course that previous condition is no longer necessary
sorry, one last condition
Merge pull request #122 from dimagi/hidden-value-brackets

If node id is set as the node name in the tree, make sure it keeps brackets
rename to hasXpathEditorChanged
only create the unsaved changes alert modal once.
stop add question if the xpath editor has unsaved changes.
Merge pull request #123 from dimagi/dark-bug

Fix for black screen of doom
remove unused function
change ItextItem to use a prototype

doesn't appear to affect the loading speed at all, not terribly
surprising
add classy library
remove hopelessly stale tests
update underscore to 1.5.2
extensive refactoring related to types

a lot of refactoring in preparation for making a non-shitty plugin
abstraction.

The main thing is that instead of

mugType.mug.properties.dataElement.properties.nodeID

it's now

mug.dataElement.nodeID

We're using a small JS library that implements class inheritance on top
of prototypes.  All the MugTypes (now Mugs) are defined using this,
and they each have this.get{Data,Bind,Control}ElementSpec() methods to
allow subclasses to override these.

Additionally

  - there's a new MugElement class encapsulates the setting, copying,
    and validation of element attributes.
  - all info about what mugs are valid children of other mugs is now
    encapsulated within the mug definitions, so the generation of jstree
    types is now a straight-up copying of the mug type definitions, and
    there is only one string used to refer to any given mug type
    throughout the code
  - had some trouble replacing existing mugType.typeSlug equality checks
    with mug instanceof MugClass checks due to the JS class library I'm
    using breaking instanceof or me possibly not understanding how to
    use it, so for now those checks remain as mug.__className === "foo"

There were also various other minor refactorings related to these
changes.
remove some unnecessary indirection in widget definitions
remove more unnecessary indirection in widget definitions

all sections simply return a list of property paths now.  Properties are
shown or hidden based on presence of the property definition + the
visibility attribute of the property definition.

If the visibility attribute is a path to another property, then the
property will be visible if that property is visible (this is used for
itext widgets -- the actual display toggling is handled by the id
widgets, though).
move/fix ODK-only question check
fix typo