tests: devicetree: refactor some for-each tests
tests: devicetree: refactor some for-each tests

Split the generic tests for DT_INST_FOREACH_STATUS_OKAY() out of the
function which tests it as applied to device instantiation.

This is just moving code around as prep work for expanding on the set
of macros which are in for-each-node style.

Signed-off-by: Martí Bolívar <9d90ac4c7bf6a305f6bfd81a23c7859bc883380e@nordicsemi.no>

finikorg/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,finikorg/zephyr,finikorg/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,galak/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr