framework/workload: Refactor apk resolution
framework/workload: Refactor apk resolution

Now allows a `prefer_host_package` parameter to be set to control
whether a package located on the host system (`True`) or on the target
(`False`) should be favoured during resolution.

setrofim/workload-automation,lisatn/workload-automation,lisatn/workload-automation,setrofim/workload-automation,setrofim/workload-automation,ARM-software/workload-automation,ARM-software/workload-automation,ARM-software/workload-automation,setrofim/workload-automation,lisatn/workload-automation,lisatn/workload-automation,ARM-software/workload-automation