Add inverse edge lookup to graphs

Enables one to check, given edge (u,v), if there is an edge (v,u) in the reverse direction.