Bug 1020306 - Make the thread/message edit mode to match the style used by other applications

Please add a comment describing what this function does because it's somewhat unclear with the new changes. Basically that if no message is selected - or if only a few are - we select all the messages and if all messages are selected we deselect them all.