[SPARK-19003][DOCS] Add Java example in Spark Streaming Guide, section Design Patterns for using foreachRDD
[SPARK-19003][DOCS] Add Java example in Spark Streaming Guide, section Design Patterns for using foreachRDD

## What changes were proposed in this pull request?

Added missing Java example under section "Design Patterns for using foreachRDD". Now this section has examples in all 3 languages, improving consistency of documentation.

## How was this patch tested?

Manual.
Generated docs using command "SKIP_API=1 jekyll build" and verified generated HTML page manually.

The syntax of example has been tested for correctness using sample code on Java1.7 and Spark 2.2.0-SNAPSHOT.

Author: adesharatushar <tushar_adeshara@persistent.com>

Closes #16408 from adesharatushar/streaming-doc-fix.

(cherry picked from commit dba81e1dcdea1e8bd196c88d4810f9a04312acbf)
Signed-off-by: Sean Owen <291c18f3fb7528c712d9098b0e50a515ea0b91d5@cloudera.com>

big-pegasus/spark,SnappyDataInc/spark,big-pegasus/spark,SnappyDataInc/spark,SnappyDataInc/spark,SnappyDataInc/spark,big-pegasus/spark,big-pegasus/spark,big-pegasus/spark,SnappyDataInc/spark,SnappyDataInc/spark,big-pegasus/spark,big-pegasus/spark,SnappyDataInc/spark