Merge pull request #165 from bruttenberg/DEV2.2

Exposed the getElementByReference function in ElementCollection.
Fixes for issue #166

This commit changes all constraint management in Figaro to log space.
There should be no forward changes for the user, and users can still
define their constraints normally and figaro will automatically convert
to log space. The major changes are:

1. Element now contains an addLogConstraint and setLogConstraint so the
user can set constraints that are already in log space
2. Added convenience classes for the two types of constraints in
ConstraintType.scala. The user should never need to call these
3. Added a LogConstraint evidence class
4. Converted MH, Imp Sampling to log space, kept factored algorithms in
double space
5. Particle Filtering is NOT in log space, since to do so would require
changing the ReSampler which is a shared class (can do so if we want)
6. Decision Imp Sampling is not fully in log space since utilities and
probabilities are multiplied, and utilities can be negative
7. Added a logSum and logSumMany function to package.scala to add values
in log space
8. Changed tests accordingly.