Fixes for the destruction of a window, either from compositor's side or ...

...from card view's side.

Note: this PR takes into account the change of name of the property "id" of the window object.

Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>