[SPARK-2515][mllib] Chi Squared test

Whether correction is used or not can actually be reflected in the method name (`pearson` v `yates`). I doubt there's a lot of use cases for parsing the result back from JSON so let's not worry about it for now. The way I see case classes is that they're like data structs that encapsulates immutable fields (the list of fields can be modified in later releases given that this is all experimental), but if there are compiler optimization complications, I can change it to a regular class.