Freesemiring

These commits implement a new FreeSemiring.  Currently we can decide at compile time whether to use the new or the old implementation.  All the tests pass and running ```newton --test``` works too, but if you have any more tests/example please do run them (there are always bugs in new code ;-).

Let me know if something breaks or if you have some comments.