lava-v2-jobs-from-api.py: consolidate iteration over all the devices
lava-v2-jobs-from-api.py: consolidate iteration over all the devices

Move the loop over all the device map devices outside of the main
fuction to improve readability.  Avoid passing the `dtb' variable
around by putting it in opts instead.

Signed-off-by: Guillaume Tucker <e7e20b7c30f19d4ca6b81319ef81bf200369d137@collabora.com>

kernelci/lava-ci-staging,kernelci/lava-ci-staging,kernelci/lava-ci-staging