dm: core: Add safe device iteration macros

Add iteration macros which support unbinding a device within the loop.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 files changed