wayland: Fixes a memory leak wheere primary selection isn't freed (cherry picked from commit 43f65a6ef08a502485c6107b255a9b22c890acd5)