Fixes #4643. Locks the upgrade process while it is running.
Fixes #1334. Added dropdown to change the parent of a page.
Refs #1334. Prevent cycles in the pages tree.
Refs #1334. Readded hidden input in edit page form, only on page creation.
persist 'selected' state of site menu
Refs #4643. Added unlock upgrade action.
switched to matching by link name - same results, simpler code
Fixes #4764: Twitter login supports persistent and referrer forwarding
Moved upgrade lock/unlock functions to upgrade.php lib.
Fixes #4789: group_gatekeeper() and river hide closed/invisible group content more reliably
Better logic for when to forward to login
Remove unneeded code
fixed: wrong link in message notification
fixed: wrong if statement in messages_send
File access control omits now access to owner control.
Fixes #1479 - Replaces WP autop with implementation from Steve Clay.
messages_send() better var names and fixed notification if sender not current user
Fixes #4929: Optimize elgg_get_entities and add attribute loader
Fixes #4946 - In views/default/core/settings/statistics/online.php there's get_system_log call but system_log call can be supressed by unregistering default handler. Better to use last_login attribute.
Avoid some warnings and a division by 0.