Fix `validate` and `cloc2` breaking with targets with no sources (#9000)
Fix `validate` and `cloc2` breaking with targets with no sources (#9000)

It's possible for a target to have no sources. 

Previously, `validate` and `cloc2` had logic to handle this situation. We removed that logic from those rules because they now request `SourcesSnapshots`, which is guaranteed through the engine to be a `Collection[Snapshot]`. 

However, we did not properly move that logic into the `hydrate_sources_snapshot` rule. This caused Pants 1.25.0.dev2 to fail in Toolchain when running `./pants validate ::`.
tdyas/pants,pantsbuild/pants,jsirois/pants,pantsbuild/pants,pantsbuild/pants,benjyw/pants,wisechengyi/pants,tdyas/pants,wisechengyi/pants,pantsbuild/pants,tdyas/pants,pantsbuild/pants,jsirois/pants,benjyw/pants,wisechengyi/pants,wisechengyi/pants,tdyas/pants,jsirois/pants,wisechengyi/pants,pantsbuild/pants,tdyas/pants,benjyw/pants,benjyw/pants,benjyw/pants,tdyas/pants,tdyas/pants,tdyas/pants,wisechengyi/pants,tdyas/pants,wisechengyi/pants,pantsbuild/pants,benjyw/pants,wisechengyi/pants,wisechengyi/pants,benjyw/pants