fix an issue with focus and active editors

fixes #483 

Fixes an issue where the active editor and the files view were fighting for focus. Now, an editor becomes focused if the user explicitly clicks on a tab header or the file is opened via an explicit user action (e.g., new file). Just selecting a file in the files view will not cause focus to shift to the editing area.

@umop for review