Make sources.js compilable with Google Closure Compiler
Initial implementation of the source template.
 This implementation requires no saving from the user: as soon as a
 field is modified the new citation is recomputed and saved.
Continued work on source citation.
 These now require an explicit Save: this is easier for the user to
 experiment and undo. This also avoids confusion when the GUI might
 not have reflected the current status of the database.