Floyd-Warshall bugfixes

Code was incorrectly using 0 instead of infinity. This lead to an exception on List.tl.

The solution is to use optional ints.