Actually compute all-pairs shortest path

This is pretty much the whole point of this code, to compute all-pairs
shortest path on network configurations so it can be abstracted out of
the DREAMER toolchain.

My current implementation appears to be stupidly slow, but I guess
that's why I get for just brute-forcing it...