[kernel|net] Add ifdef for USE_ESOCK
[kernel|net] Add ifdef for USE_ESOCK

Some functions are not needed when ESOCK (USE_ESOCK disabled)
has been disabled.

OTP-16464

jj1bdx/otp,vinoski/otp,g-andrade/otp,g-andrade/otp,emacsmirror/erlang,bjorng/otp,dumbbell/otp,potatosalad/otp,mikpe/otp,bjorng/otp,mikpe/otp,potatosalad/otp,dgud/otp,bjorng/otp,dgud/otp,erlang/otp,isvilen/otp,g-andrade/otp,emacsmirror/erlang,erlang/otp,rlipscombe/otp,emacsmirror/erlang,dgud/otp,vinoski/otp,rlipscombe/otp,dumbbell/otp,emacsmirror/erlang,vinoski/otp,isvilen/otp,potatosalad/otp,potatosalad/otp,bjorng/otp,vinoski/otp,erlang/otp,mikpe/otp,bjorng/otp,jj1bdx/otp,dumbbell/otp,rlipscombe/otp,potatosalad/otp,potatosalad/otp,dumbbell/otp,potatosalad/otp,bjorng/otp,jj1bdx/otp,mikpe/otp,erlang/otp,dumbbell/otp,erlang/otp,isvilen/otp,dgud/otp,vinoski/otp,emacsmirror/erlang,emacsmirror/erlang,rlipscombe/otp,vinoski/otp,erlang/otp,dgud/otp,emacsmirror/erlang,erlang/otp,vinoski/otp,g-andrade/otp,g-andrade/otp,mikpe/otp,rlipscombe/otp,mikpe/otp,jj1bdx/otp,rlipscombe/otp,dumbbell/otp,erlang/otp,bjorng/otp,emacsmirror/erlang,isvilen/otp,isvilen/otp,dgud/otp,jj1bdx/otp,g-andrade/otp,mikpe/otp,bjorng/otp,mikpe/otp,dumbbell/otp,jj1bdx/otp,mikpe/otp,erlang/otp,isvilen/otp,jj1bdx/otp,g-andrade/otp,potatosalad/otp,mikpe/otp,isvilen/otp,vinoski/otp,vinoski/otp,rlipscombe/otp,potatosalad/otp,dumbbell/otp,isvilen/otp,bjorng/otp,jj1bdx/otp,emacsmirror/erlang,bjorng/otp,dgud/otp,rlipscombe/otp,dgud/otp,erlang/otp,dgud/otp,rlipscombe/otp,emacsmirror/erlang,g-andrade/otp,rlipscombe/otp,jj1bdx/otp,g-andrade/otp,isvilen/otp,dgud/otp,dumbbell/otp,g-andrade/otp,jj1bdx/otp,vinoski/otp,dumbbell/otp,isvilen/otp,potatosalad/otp