terminal: only open 1 terminal session (per vm) when old sessions fail
terminal: only open 1 terminal session (per vm) when old sessions fail

This is the result of having added 1 listener per vm.  We were trying to avoid that by using a dirty flag per-vm, but that failed because of a bug where the dirty flag was getting unset whenever the state of the tabs changed, so every time a tab is closed, which happens when we cancel the terminal.  Prcatically, that meant that for N old sessions that could not be restored (per vm), we would end up adding the listener N - 1 times, e.g. if you previously had 3 tabs open, clicking "Create a new session" would open 2 new tabs.

szkl/koding,rjeczalik/koding,kwagdy/koding-1,sinan/koding,andrewjcasal/koding,drewsetski/koding,acbodine/koding,andrewjcasal/koding,drewsetski/koding,usirin/koding,rjeczalik/koding,alex-ionochkin/koding,jack89129/koding,koding/koding,koding/koding,gokmen/koding,andrewjcasal/koding,alex-ionochkin/koding,drewsetski/koding,sinan/koding,koding/koding,kwagdy/koding-1,usirin/koding,mertaytore/koding,kwagdy/koding-1,cihangir/koding,alex-ionochkin/koding,cihangir/koding,szkl/koding,sinan/koding,cihangir/koding,rjeczalik/koding,alex-ionochkin/koding,andrewjcasal/koding,kwagdy/koding-1,szkl/koding,acbodine/koding,mertaytore/koding,rjeczalik/koding,usirin/koding,gokmen/koding,usirin/koding,mertaytore/koding,alex-ionochkin/koding,andrewjcasal/koding,rjeczalik/koding,acbodine/koding,koding/koding,rjeczalik/koding,jack89129/koding,drewsetski/koding,drewsetski/koding,acbodine/koding,rjeczalik/koding,jack89129/koding,jack89129/koding,andrewjcasal/koding,koding/koding,szkl/koding,cihangir/koding,jack89129/koding,acbodine/koding,cihangir/koding,usirin/koding,jack89129/koding,koding/koding,mertaytore/koding,gokmen/koding,sinan/koding,mertaytore/koding,gokmen/koding,andrewjcasal/koding,gokmen/koding,drewsetski/koding,cihangir/koding,alex-ionochkin/koding,sinan/koding,mertaytore/koding,mertaytore/koding,gokmen/koding,szkl/koding,cihangir/koding,szkl/koding,rjeczalik/koding,andrewjcasal/koding,kwagdy/koding-1,usirin/koding,kwagdy/koding-1,sinan/koding,drewsetski/koding,mertaytore/koding,gokmen/koding,szkl/koding,sinan/koding,sinan/koding,alex-ionochkin/koding,szkl/koding,acbodine/koding,jack89129/koding,drewsetski/koding,acbodine/koding,kwagdy/koding-1,usirin/koding,gokmen/koding,jack89129/koding,koding/koding,usirin/koding,kwagdy/koding-1,alex-ionochkin/koding,koding/koding,cihangir/koding,acbodine/koding