Fixes #1708. Moving up subpages when delete a page wasn't be applied in page_top subtype.
fixed the switch from page to page_top - the parent_guid metadata needed to be deleted
Refs #1708. Restore disappeared subpages, which its parent page was top_page and was deleted.
fixed upgrade script - was skipping pages because we were changing the results between calls to ElggBatch
clear entity cache for the subpages that were promoted to pages
Merge pull request #5305 from cash/delete_top_page

Moving sub pages to top pages when parent deleted