free-semiring: initial work on the new implementation
free-semiring: implement printing and evalution

This implements printing to string as well as to dot format.  In
the latter case we get the DAG containing all the FreeSemiring
objects.  Moreover now we can also evaluate the FreeSemiring when
given a map from variables to values.
free-semiring: use shared_ptr to avoid copying
free-semiring: implement evaluation for matrices
free-semiring: remove some old code and fix a test
main: std::accumulate is defined in numeric header
free-semiring: split the old and new implementations

This splits the old and new implementation of FreeSemiring.  The new
implementation is a drop-in replacement of the old one. By default we
build the new one, however, you can build the old one by calling cmake
with -DOLD_SEMIRING=1.

The commit also includes some changes to the evaluation of
FreeSemiring over some other semiring.  Now the mapping used during
evalutaion maps from VarPtr (instead of from FreeSemiring) to some
semiring value.

Finally this also fixes some minor bugs in the multiplication and star
operations of the new implementation.