Refactorings in Graph implementation.

- graph.resolve now returns a property, having a node and a relative
  path to the property value.
- straightened index bookkeeping implementation
Fix regressions.