Previously, current message selection was saved only when switching
collections. As the result, selection changes were not always saved,
breaking the PreSelectLastSelected mode (which is the default one in
e.g. KMail).
This commit fixes the issue by saving current selection at tab close
and at Pane destruction (i.e. application exit).