have a source file be aware of which configured source it belongs to

This is the first step to using per-source engines.  This source
file needs to know which configured source it belongs to so it knows
where to get its engines.

This uses a similar algorithm to looking up source files by digest
path (`find_by_digest_path`).  It scans the sources for ones where
the source path is included in its path.  If multiple match, the
last matching one is chosen to match the last matching source file
path in the digest lookup.  Since the last matching file path (from
the last configured source) is always in use, we should match this
and make sure the last source is always in use as well.