Waiting for marijnh/CodeMirror#2681 .
Save hub states on ctrl-c and restore on startup.