Improve matching between active component status and directory page status.

* When a directory page is deleted, delete the corresponding entry from bp_pages. This ensures that the admin will see the admin_notice that a page mapping is missing.
* When pulling up page mappings with `bp_core_get_directory_page_ids()`, remove entries corresponding to deleted pages and deactivated components.

Props Mamaduka.
Fixes #5681.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@9177 cdf35c40-ae34-48e0-9cc9-0c9da1808c22