Provide the ability to pull missing buildtrees via the scheduler outside of user invoked bst pull & build
Background
#494 has criteria which expects the buildstream scheduler to be able, as an example, to attempt to pull a missing artifact buildtree dir if that is the given content/config in which the bst workspace was initiated.
!786 (merged) Added the default behaviour of not downloading (with the ability to override) artifact buildtrees by default when directly spawning element pull jobs (element.py to artifactcache.py) via stream.py's construction of scheduler pull queues. As it stands the only two bst commands that utilise said pull queues are bst pull and build. These queues also provide the functionality to download the missing buildtree into an existing build artifact.
As it stands when attempting to use a buildtree anywhere else in the codebase, the assumption that it is or will be cached locally has to currently be skipped, warning the user as such if appropriate. The pullqueue scheduler creation should be made accessible to these instances (workspace buildtrees, pushing partial artifacts, staging buildtrees in sandbox as examples) via one api path to attempt the partial pull if appropriate.
Task description
- Create a generic way for the pullqueue scheduler to be generated outside of bst pull/build which can be used throughout buildstream in instances where a cached buildtree is expected to be required
- Implement into said instances as appropriate once available.
Acceptance Criteria
This will close the final point of #494