Update java source example

From the version 1.0 FilterBuilders and QueryBuilders are not part from org.elasticsearch.index.query.xcontent package no more.

Closes #7701.
Apply bulk change to 1.3.3

relates to #7729
Docs: IndexResponse.matches() does not exist anymore

Since 1.0, percolator has been redesigned so percolator is not applied anymore at index time.

Closes #7548.
Document the Java BulkProcessor

Closes #7638.

(cherry picked from commit f0dc8a8)
[TEST] Ensure primaries are allocated before bulk indexing with dymamic mappings
[RECOVERY] Mark last file chunk to fail fast if payload is truncated

Today we rely on the metadata length of the file we are recoverying
to indicate when the last chunk was received. Yet, this might hide bugs
on the compression layer if payloads are truncated. We should indicate
if the last chunk is send to make sure we validate checksums
accordingly if possible.

Closes #7830
Chunk direct buffer usage by networking layer
Today, due to how netty works (both on http layer and transport layer), and even though the buffers sent over to netty are paged (CompositeChannelBuffer), it ends up re-copying the whole buffer into another heap buffer (bad), and then send it over directly to sun.nio which allocates a full thread local direct buffer to send it (which can be repeated if not all message is sent).
  This is problematic for very large messages, aside from the extra heap temporal usage, the large direct buffers will stay around and not released by the JVM.
  This change forces the use of gathering when building a CompositeChannelBuffer, which results in netty using the sun.nio write method that accepts an array of ByteBuffer (so no extra heap copying), and also reduces the amount of direct memory allocated for large messages.
  See the doc on NettyUtils#DEFAULT_GATHERING for more info.
closes #7811
[TEST] disable translog based flushes when corrupting files

These tests rely on the fact that all files stay the same after
the corruption and if we run into a translog based flush we might
use a new / different delete file causing the test to fail.
Docs: java add static imports for query and filter builders

Also move and add inline comments to references

Closes #6920.

(cherry picked from commit cdd4d00)
[TEST] Make sure test actually throttles
Fix NPE in /_cat/nodes

Query Cache and Suggest stats were introduced in v1.4.0_beta1 and 1.2.0 respectively, therefore they can be null while stats are received from older nodes in the cluster.

Fixes #6297