BUG: Qt: Destroying Window does not destroy native control.

Closing/destroying the window did not destroy the native control
which may appear as a memory leak.
This also affects TaskApplication, which leaves around TaskWindow
references even after the window is closed.