Implements #4453: entities/river queries alterable by hooks

This should probably be accompanied by adding names to all the major public-facing lists/river views, so we should be sure this is a good idea.

With this in place, one could alter $options arrays simply:

```php
// set the main activity stream limit to 50
function my_plugin_alter_river($h, $t, $v, $p) {
    $v['limit'] => 50;
    return $v;
}
elgg_register_plugin_hook_handler('river:options', 'activity/all', 'my_plugin_alter_river');
```

Or you could make reusable queries by putting a full set of options in the hook:

```php
function my_plugin_fetch_foos($h, $t, $v, $p) {
    return array_merge($v, array(
        'type' => 'object',
        'subtype' => 'foo',
    ));
}
elgg_register_plugin_hook_handler('entities:options', 'my_plugin:foos', 'my_plugin_fetch_foos');

echo elgg_list_entities(array('query_name' => 'my_plugin:foos'));
```