[SPARK-2515][mllib] Chi Squared test

ditto: use a map instead of linear lookup