Clarify find_matching_resource intentions

- Add documentation and use smaller methods to reveal
  ResourceCollection.find_matching_resource intentions and the order of
  precedence.
- Add more specs to verify functionality.