[path] generalize WEIGHT signature

I generalized the `Path.WEIGHT` signature slightly by changing the type of `weight` from `lable -> t` to `edge -> t`. This allows meaningful weights even when using graphs with `()` edge labels. Also see #20.

Note that the changes are marginal, and note that every call to the weight function in the library had the form `weight (G.E.label e)` anyways, which now simplifies to `weight e`.