[Query] QueryParser can return null from a query

This causes a NPE since XContentStructure checks if the query is null
and takes this as the condition to parse from the byte source which is
actually null in that case.

Closes #6722
[TEST] assert search results before comparing the results - shards / indices might be missing
[TEST] use existing client that is already in the cluster to wait for joining node
Updated cache.asciidoc

The index level filter cache was removed a long time ago

Closes #6455
[TEST] Order of the results is not important in this test
The query string cache can't return the same instance, since Query is mutable changing the query else where in the execution path changes the instance in the cache too.

Instead the query parser cache should return a cloned instances.

Closes #2542
Closes #6733
Added licence header
[TEST] Reset all cluster if a test hit a failure

Closes #6734
make sure we use the new analyzer wrapper on 4.10
PluginManager: tests for missing plugin name when passing --url

Adding code to test for unset plugin names to fail fast with descriptive error messages. Also simplified the series of `if` statements checking for the commands by using a `switch` (now that it's using Java 7), added tests, and updated random exceptions with the up-to-date flag names (e.g., "--verbose" instead of "-verbose").

Closes #5976.
Closes #6013.
[TEST] mute test - working on a fix
Docs: Link to eskka discovery plugin from doc

Closes #6721
[TEST] Ensure scores are consistent.
Removing plugin does not fail when plugin dir is read only

If you try to remove a plugin in read only dir, you get a successful result:

```
$ bin/plugin --remove marvel
-> Removing marvel
Removed marvel
```

But actually the plugin has not been removed.

When installing, if fails properly:

```
$ bin/plugin -i elasticsearch/marvel/latest
-> Installing elasticsearch/marvel/latest...

Failed to install elasticsearch/marvel/latest, reason: plugin directory /usr/local/elasticsearch/plugins is read only
```

This change throw an exception when we don't succeed removing the plugin.

Closes #6546.
Update plugins.asciidoc
Update lang-analyzer.asciidoc

Clarified the use of the `stem_exclusion` token filter.

Closes #6613
[Logging] added trace logging to TransportShardSingleOperationAction

And enabled them on SimpleRecoveryTests.testSimpleRecovery
[TEST] wait for no pending tasks so processed all mappings
[TEST] also assert that put mapping is ack'ed
[QUERY] Remove Queries#optimizeQuery(...)

This method tires to optimize boolean queries if there is only
one clause. Yet BooleanQuery already does that internally This
optimization is unneeded.

Closes #6743