Purges key select window options on dialog close

Adds change_identity event capture for #139

Fixes #139 given that the change_identity event is triggered in
Roundcube's app.js. At current time it needs to be added manually.