fixed MLlib Naive-Bayes java example bug

the filter tests Double objects by references whereas it should test their values

Author: Dariusz Kobylarz <darek.kobylarz@gmail.com>

Closes #3081 from dkobylarz/master and squashes the following commits:

5d43a39 [Dariusz Kobylarz] naive bayes example update
a304b93 [Dariusz Kobylarz] fixed MLlib Naive-Bayes java example bug

(cherry picked from commit bcecd73fdd4d2ec209259cfd57d3ad1d63f028f2)
Signed-off-by: Xiangrui Meng <meng@databricks.com>