element.py: Combine cache query and pull into `_load_artifact()`

In non-strict mode cache query and pull are intertwined as we prefer
pulling the strict artifact to a cache lookup with the weak cache key.

This replaces `__update_artifact_state()` and `_pull()` with a combined
`_load_artifact()` method, which supports cache query with deferred
pulling. This provides correct behavior with the flexibility of split or
combined cache query and pull.
5 files changed