Implemented an indomain model implementation of NaiveBayes (copied most from C++ version.

ATM it is EXTREMLY SLOW since i am using a third pary library for
arbitrary precicion floaing points.