Set the window modality just before the window is shown on Wx.

This prevents exceptions raised during initialization from blocking the
rest of the app, since Wx blocks as soon as the flag is set, instead of
when the window becomes visible.
Add border support for Container on the Qt backend