fix occasional crash on dragging and dropping pages in slidesorters

pages go into the cache, and sometimes they get deleted before the
cache gets processed. Remove deleted pages when they go away

Change-Id: I291072a8541f4ca36979e9914975d81cc23a9497
(cherry picked from commit abe9d1463282690313aaf91d2a54011d10b900b9)
pages with equal Priority and Class getting dropped

Change-Id: Ib053dc4b6e5fb5f01f48c71a4b295a53c0ec6715
(cherry picked from commit 9790588da4b2de455ffc7a2cc69f26539823c3da)