fix(menu): check if admin page menu items exist before sorting them

Allow admin page menu to be altered without causing WSOD. Adds regression test
Fixes #6379
Merge pull request #6397 from hypeJunction/admin-menu-sort

Fixes #6379: Makes sure that page menu items exist before trying to prepare them for viewing
fix(cache): removes memory leak when clearing an entity's metadata cache


When clearing the metadata cache for a particular entity, an empty array was
unnecessarily left for each GUID removed from cache. This instead removes the
entire key for the GUID.
perf(batch): reduce memory usage during batch processes

Result sets for batch queries tend to be large and bloat the query
cache without being of much use. Since the LRU cache is limited in
key size (not memory size), the simplest solution is to flush it
during batch operations.
Merge pull request #6423 from mrclay/metadata_clear_leak

fix(cache): removes memory leak when clearing an entity's metadata cache
Merge pull request #6424 from mrclay/reduce_batch_mem_usage

perf(batch): reduce memory usage during batch processes
fix(rss): corrects syntax errors preventing RSS validation

Now RSS pages with files will be validated by W3C and are more likely
to be handled by a wide variety of RSS readers.

Fixes #6411
Merge branch 'gerard-kanters-patch-5' into 1.8
perf(groups): remove redundant filter of user-owner group acls

Since 1.8 upgrade the iteration to filter out acls that define group membership and are owned by the user are redundant

Fixes #6434
Merge pull request #6459 from hypeJunction/groups-write-access-hook

Fixes #6434: remove redundant filter of user-owner group acls
chore(thewire): few code enhancements in the wire js file
Merge pull request #354 from sembrestels/thewire-js-php

TheWire js cleanup
fix(groups): forces content accessibility to members_only for invisible groups

When user selects "Group members only" for group visibility, javascript sets
the group content accessibility field to "Members only" and disables it.

For existing groups the above is done also on server side.

When editing an existing public group, a warning is added under the group
content accessibility input saying that changing the setting won't change
the access permission of existing group content.
fix(core): Not redirecting in plugin and site entity views.

This redirect is infuriating to encounter if you pass invalid options to ege() and wind up on the index page for no apparent reason.

Fixes #4439.
chore(admin): Moved site secret regeneration to advanced settings.

Fixes #6443.
chore(admin): Moved site secret regeneration to the advanced settings action and form.
Merge pull request #6524 from brettp/site_secret_18

chore(admin): Moved site secret regeneration to advanced settings.
fix(embed): file embedding wasn't working for textareas

Issue was introduced in 8b358c5 by removing the line that applies the text
change in textarea.

The way to extend javascript from the rich text editor was to extend a view
in js/embed/embed. It has been refactored to the 'embed', 'editor' js hook,
in order to make js/embed/embed convertible to js file. The view extension
has been deprecated.

Text areas and rich text editors manage the insertion diferently. In order
to insert the content in the correct place, we allow rich text editors to
return false inside the hook to stop the insert, and apply it just once.

Fixes #6160
chore(uservalidationbyemail): cleans up implementation

This moves the page handling logic to separate scripts and also
replaces direct $_SESSION access with the elgg_get_session() API.
fix(css): reposition powered by elgg

Fixes  #6534