Merge pull request #557 from ScrapCodes/style. Closes #557.

SPARK-1058, Fix Style Errors and Add Scala Style to Spark Build.

Author: Patrick Wendell <pwendell@gmail.com>
Author: Prashant Sharma <scrapcodes@gmail.com>

== Merge branch commits ==

commit 1a8bd1c059b842cb95cc246aaea74a79fec684f4
Author: Prashant Sharma <scrapcodes@gmail.com>
Date:   Sun Feb 9 17:39:07 2014 +0530

    scala style fixes

commit f91709887a8e0b608c5c2b282db19b8a44d53a43
Author: Patrick Wendell <pwendell@gmail.com>
Date:   Fri Jan 24 11:22:53 2014 -0800

    Adding scalastyle snapshot
renaming LeastSquaresGradient

not to confuse with squared regularizer or a squared gradient. added
some more comments as what the loss functions are good for
use d for the number of features

try to be consistent, that n is the number of data examples in the RDD,
and each of them has d entries (also in documentation)
correct scaling for MSE loss

to be consistent with the documentation
new classification and regression documentation

with complete mathematical formulations. trying to be general for
adding future ML methods as well. table of all subgradients used for
reference.
this change also required a small addition to the mathjax
configuration, to allow equation numbers.
new optimization documentation

explaining GD and SGD and the distributed versions that MLlib
implements.
better comments in SGD code for regression
lambda R() in documentation
telling what updater actually does

also use proper scaling for the L2 regularization (using 1/2 as in the
documentation)
remove broken url
better description of GradientDescent
line wrap at 100 chars
Merge branch 'copy-MLlib-d' of https://github.com/martinjaggi/incubator-spark into copy-MLlib-d

Conflicts:
	mllib/src/main/scala/org/apache/spark/mllib/optimization/GradientDescent.scala