Safe mode implementation
Created by: valer1435
Sometimes we faced with large table datasets (when MxN is too large). It may cause a problems with memory. This pull request is devoted to solving such problem by cutting train data. Also a problem with encoding categorical features with big cardinality should be resolved in this PR. To do this we use label encoding when summary cardinality become bigger than a constant threshold.