Only delete the capture window if it has no parent

delete-window will give an error if the window is the sole window in its
frame. In my emacs confige i use popup-like 'capture' frames for
denting, twisting, etc.
On cancelling or posting, the delete-window would fail, so a test for a
parent window prevents this.