Add working implementation of binomial distribution calculation.

However, it is extremely ineffective.  Also, add IDEA project.