Bug 943116 - folderDisplay.selectedMessages is too slow; part 1: use selectedCount and selectedMessage where possible; r=standard8