_elementsources: cache intermediate combined sources (in-memory)

When tracking an element that has multiple sources that depend on previous
sources, buildstream stages all previous sources each time, and since they
aren't cached because we only cache sources that don't depend on previous
sources or combined elements this ends up staging things from original sources
again and again.

This change keeps the a digest of the intermediate staged sources in memory,
and speeds up these cases a lot
1 file changed