[SPARK-707] Adding Java versions of Pi and LogQuery examples