Two identical declarations of NodeId make it ambiguous for static analysis tools such as IWYU which header should provide the symbol. Move the declaration into net_types.h.
The second commit fixes the #includes of the net, net_types and node/eviction modules, which the first commit touched, and adds the headers that other files previously received transitively from them.
A prerequisite for #36808.