Fix file history in File menu broken on GTK+

Due to a merging artifact, OnOpenHist was never called on GTK+.
Handle Cmd+W correctly on OS X

Close any active window when Cmd+W is pressed, not just the main frame
and a few with special handling.  Do this by handling wxID_CLOSE in
PoeditApp and calling Close() on the currently active toplevel window.