[WIP] Chi squared test

API and code structure.
Just talked with @mengxr and am going to use toString() for the decision tree code, so +1 for toString here too.