Revert "device: simplify structure of handles array"

This reverts commit ec331c6fe21f2bbbf4b0d1c3667c294320b1c924.

Although it's a valid simplification under the assumption that we're
going to be padding the array out anyway, it would use extra ROM if we
fix the build system issues that are currently forcing gen_handles.py
to introduce extra padding in the handles arrays for linker pass 2.

On the (perhaps optimistic) assumption that we're going to fix the
build system, let's get rid of a commit that would get in the way. The
extra "complexity" in device_required_handles_get() is trivial.

This gets rid of a comment describing the linker passes, but the
structure of the comment is a bit misleading (and it contains
incorrect information for the results of pass 2: the terminator at the
end is DEVICE_HANDLE_ENDS, not DEVICE_HANDLE_NULL).

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
diff --git a/scripts/gen_handles.py b/scripts/gen_handles.py
index 4e5764f..1d19619 100755
--- a/scripts/gen_handles.py
+++ b/scripts/gen_handles.py
@@ -300,11 +300,10 @@
                         dep_paths.append(dn.path)
                     else:
                         dep_paths.append('(%s)' % dn.path)
-            # Force separator to signal start of injected dependencies
-            hdls.append(DEVICE_HANDLE_SEP)
             if len(hs.ext_deps) > 0:
                 # TODO: map these to something smaller?
                 ext_paths.extend(map(str, hs.ext_deps))
+                hdls.append(DEVICE_HANDLE_SEP)
                 hdls.extend(hs.ext_deps)
 
             # When CONFIG_USERSPACE is enabled the pre-built elf is