net: update incorrect Doxygen documentation in netbase.cpp
net: move Doxygen docs from netbase.cpp to netbase.h
This is a backport of core#21444
Notes :
- the third commit is not applicable due to D11042 (replacement of SOCKET &hSocketRet with Sock &sock in the function signature).
- the doxygen doc for Socks5 cannot be moved because we didn't backport core#19203, so it is still a static function not defined in the header.
Depends on D11067