Reference-scope narrowing shared by every codeLens/resolve of a file.
The first resolve at a write revision narrows all of the file’s lens
symbols in one workspace pass (see
DocumentStore::batch_reference_candidate_files); concurrent and later
resolves at that revision wait for and reuse it.
Build all code lenses for uri/doc. Reference-count lenses come back
without a command; resolve_code_lens fills them in. Their symbols are
recorded in scopes so the first resolve can narrow them all at once.
Fill in a reference-count lens produced by code_lenses; any other
lens is returned unchanged. rev is the workspace write revision the
lookup runs at: a write past it aborts with ContentModified.