[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.