I would like to install this change if everyone thinks it's fine. It adds a function `kill-xwidget', which allows Lisp code to kill a single xwidget without killing the buffer it is attached to. Thanks.