Matrix improvements

This implements the generalized Floyd-Warshall algorithm and cleans up the ```matrix.h```.  Apart from that, I've included a few other fixes.

Note that currently the ```recursive_star``` is still the default for computing star of a matrix.  But we might want to switch rather sooner than later -- it seems that at least in some cases Floyd-Warshall creates less nodes of FreeSemiring...