[SPARK-1655][MLLIB] Add option for distributed naive bayes model.

Adds an option to store a naive bayes model distributively. The default behavior, in which the whole model is stored on the driver node, remains unchanged. NaiveBayes.train’s new distMode parameter can be used to request that a model be distributed.

When distributed, the model is stored as an RDD of model blocks. Each block contains the labels and prior and conditional probabilities for a set of label classes, allowing fast computation of the maximum a posteriori prediction for each block and straightforward aggregation of these MAP predictions across blocks.
Potentially the test vectors could be batched here to reduce the number of intermediate distributed objects.