temporarily revert to state at e265056 for testing
Revert "temporarily revert to state at e265056 for testing"

This reverts commit 0bdc2d38a447b9cb17a82ee0c718e7a38ddec271.
working travis config?
un-nest a closure
remove needless indirection
add itemset support

This adds support for new "Dynamic List" multiple choice questions that
use itemsets.

It introduces a declarative configuration setting for defining available
instances, the node names of their levels, and filter conditions that
correspond to known subsets of a level (a case type, for example).

Currently, only the leaf-level subsets are displayed as separate data
sources that the user can choose from, and there is no way to add filter
conditions on internal nodes in the nodeset path, but if an XForm is
loaded with filter conditions on internal nodes, they will be preserved
as long as the data source is never touched.

It also allows the user to add custom instances with arbitrary URIs.

To enable integrating the UI widgets for the different pieces of the
itemset configuration more tightly, the itemset widget mostly eschews
the property/widget framework, building on the refactorings from 617c649
and b0ec68d.

Icons, copying, and changing question types behave in unsurprising ways.
Merge pull request #83 from mwhite/itemsets

itemsets
merge temp-fix
Merge branch 'develop' of github.com:dimagi/Vellum into develop
Merge branch 'develop' of github.com:dimagi/Vellum into develop

Conflicts:
	dist/vellum.min.js
	src/js/widgets.js
Merge branch 'temp-fix' into develop

Conflicts:
	dist/vellum.min.js
Merge branch 'develop'
fix mixed up variable names
Merge branch 'develop' of github.com:dimagi/Vellum into develop

Conflicts:
	dist/vellum.min.js
use bower
major refactoring

Use RequireJS, eliminate the formdesigner singleton with controller,
model, and ui having tangled inter-references including a bunch of event
soup, in favor of well-defined coponents using events only for loose
coupling.

See https://gist.github.com/mwhite/10e42de5b24b3437a610 for additional
explanation.

This removes the recently added duplicate ID renaming on save, in favor
of, when the nodeID property is changed via a widget change,
short-circuiting the change if a sibling has the same nodeID, and then
behaving similarly to when the XPath editor has unsaved changes until
you've finished entering a valid nodeID.  In service of this, the
"unsaved changes" short-circuiting now fires on several other events
besides selecting a node:

- adding a question
- saving the form
- selecting any tools menu item
- moving a question

Currently these are all done explicitly, although it might be possible
to have fewer locations where the check is called by putting it in e.g.
beforeSerialize().

This also manages all of the media uploader dependencies using
RequireJS.

Fixes:

 - #59: use RequireJS
 - #84: choice icon in tree should change when moving from single to
   multiple answer or vice versa
make the UI self-contained, no global IDs
remove add/remove language code

it's never run
change some classes to use prototypes instead of closures for methods:

ItextForm, ItextModel, LogicExpression, LogicManager
misc factoring fixes for the past few commits

(not going to bother trying to rebase these correctly)