fix(pages): can delete comments if canEdit page container

Fixes #7007 

TODO:
 * [ ] Fix commit message according to #5976 
 * [ ] Pull out logic into `_pages_can_delete_page()` function (mark `@access private`)
 * [ ] Check for container existence before checking edit permissions
 * [ ] Remove check for container type as 'group'