Merge pull request #207 from mwhite/temp-fix

fix remaining outstanding issues
Reduce messages overload

Show only the last error if there are multiple.
fix mixed up variable names
Merge pull request #209 from dimagi/109014-error-popups

Reduce messages overload
Preserve whitespace during XML serialization
Merge pull request #210 from dimagi/109032-line-breaks-in-hidden-values

Preserve whitespace during XML serialization
Fix barcode icon

FB case 109900
Merge branch 'master' into develop-fixes

- Refactor XMLWriter patch
- Tabs -> spaces in util.js
- Regenerated vellum.min.js

Conflicts:
	src/js/util.js
Merge pull request #211 from dimagi/develop-fixes

Develop fixes
Clean up
Switch to fixed/improved fork of XMLWriter
Generate js
Merge pull request #212 from dimagi/fix-develop

Fix develop
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)