[SPARK-2433][MLLIB] fix NaiveBayesModel.predict

This is the same as https://github.com/apache/spark/pull/463 , which I forgot to merge into branch-0.9.

Author: Xiangrui Meng <meng@databricks.com>

Closes #1453 from mengxr/nb-transpose-0.9 and squashes the following commits:

bc53ce8 [Xiangrui Meng] fix NaiveBayes
[SPARK-1112, 2156] (0.9 edition) Use correct akka frame size and overhead amounts.

backport #1172 to branch-0.9.

Author: Patrick Wendell <pwendell@gmail.com>

Closes #1455 from mengxr/akka-fix-0.9 and squashes the following commits:

a99f201 [Patrick Wendell] backport PR #1172 to branch-0.9