Convert to backbone relational

Use backbone relational to (a) avoid saving collections by themselves
(convention) and (b) allow extra note related attributes to be stored
(magic note version).
Use magic note.
Fix js formatting.