fixed some weirdness around opening/closing new notes, and cids not being overwritten by ids from cloudant