Synchronize netmgr sub-library with main branch
This MR pulls all the improvements from the netmgr refactoring to the 9.16 branch. It doesn't change how we use the library outside the directory (except for API rename changes).
Closes #2321 (closed)
Edited by Ondřej Surý