rename BPFactorTreeSumProduct -> BPFactorSumProduct for consistency
get rid of code duplication, subtle bugs and inconsistencies with null set of varying neighbors and left vs right varying neighbors
get rid of factorNeighborIndex which was not only unused but also being set incorrectly
get rid of bad type bound
fix very tricky bug where single-variable chain BP gives wrong factor marginals and can break learning
max product variable marginals fixed to be one-hots, small tweaks
BP: not using BP summaries for chain max
Merge pull request #1 from alextp/revisit-bp

Revisit bp
BP: not creating a BPSummary for the single-variable MAP chain case
BP: removing unused method
BP: making tree max product backpropagate things correctly and not use BPSummaries
BP: loopy max now also uses a MAPSummary
BP: removing separate types for BPVariableMaxProduct and BPVariableSumProduct; the MaxProduct version is no longer needed as it never gets seen outside BP.scala
BP: removing intellij warnings
BP: removing the difference between BPFactorSumProduct and BPFactorMaxProduct
BP: adding BPFactor3
BP: adding support for factor4
tutorial: removing warning
BP: removing specialized traits for sum & max product, just using the ring for that
BP: making BPRing actually a ring, pulling the factor factory out