Supporting both sum of logarithms and product versions of factor vertex and variable vertex.
Switched to ScalaTest.

Removing values that are close to 0 from Factor.
Using ScalaCheck to test Factor properties.