Fix RelationshipResolver to examine provides as well.

This is a solution to #175, and it's a single commit: 987b837.

However this depends upon a number of other branches, as this solution here practically drops out of the work done in them. Hence this PR includes:

- PR #182
- PR #180
- PR #178

Happy to rebase if desired. :)