Window Widget Enhancement - Allow onClose Listener

Sometimes we want to trigger some action when window is being closed.
For example, we register some listeners in one window, and we want to
unregister them after this window is closed, in this case we can take
advantage of this feature.

Signed-off-by: Hongliang Wang <hlwang@linux.vnet.ibm.com>