dm: core: Allow iterating devices without uclass_get()