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(entities): reverts to 1.8 behavior of ElggEntity->subtype reads

The subtype property was never properly implemented to return the string subtype
but rather returned the integer ID of the subtype. Although this was "fixed" before
this commit, it was decided that it was dangerous to start returning strings where
older plugins might be expecting integers. This deprecates reads of the property
altogether (encouraging the use of getSubtype()) and otherwise returns the behavior
of the property in Elgg 1.8.

Fixes #5920
perf(upgrade): speeds up migrating remember me codes

The Remember me cookie implementation has been improved by moving codes
to a separate table. This performs that migration in one query.

Fixes #6204
test(groups): add regression test for write access array

Make sure group acl is always within the users write access array when within that groups context

Refs #6393
fix(groups): fix the group acl id in write access array

Refs #6393
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
chore(groups): group acl name formatting
test(groups): update the scope and assumptions of the test
fix(routing): URL-decodes path segments like Elgg 1.8

Non-ASCII characters get URL encoded in $_SERVER['PATH_INFO'] so instead we
copy the URL path into a query string var and use that var to build path
segments in the router. This should yield identical behavior as Elgg 1.8.

Fixes #6218
fix(http): makes HTTP request/parameter bag PHP 5.2 compatible

The original Symfony versions use array_replace. We use array_merge, which
is identical for the purpose it's used.
test(groups): corrects tests for groups write access hook

If an admin user is logged in, all permissions tests pass, even if
we're testing whether a non-admin user has access to something. This
turns on access control for the test.
test(routing): adds more comprehensive tests for router

This tests that the router passes the URL segments and original
identifier to the page handler, and that a URL-encoded segment
is properly decoded.
feature(users): making nicer lost password process

1. User clicks "forgot password" and makes request
2. User receives via e-mail a URL to reset password
3. Accessing URL gives user a form to set her new password (uses temporary session bound to user account, but not logged in)
4. If password fields agree (and pass requirements), the password is set on the account, and the user is logged in.

There's just no need for the temporary password and forcing the user to login and change it.

Fixes #5886
chore(users): differentiating between user changing password and admin reset
security(users): making change password emails expire
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