registrar: add path-URI prefix filter to lookup()

- Add a third, optional parameter to module function lookup(),
  specifying a prefix to match against each contact's path URI
- If the filter is given:
    - skip contacts with path-URI not beginning with that prefix; use
      the first matching one to rewrite message destination URI.
    - don't append branches for remaining contacts with path-URI not
      beginning with the specified prefix.
- Improve naming in lookup slightly
- Update README
registrar: check lookup prefix early to avoid breaking method filtering

The original implementation exposed a possible bug by filtering on
_required_prefix as a discrete step after allowed method filtering; this
could cause a contact with disallowed method to be used to set the
request URI in some cases. Checking both filter conditions in the same
early loop should fix this.