[socket] Restructure the close function(s)
[socket] Restructure the close function(s)

To increase readability the close function has been slightly
restructured.

kvakvs/otp,potatosalad/otp,ferd/otp,rlipscombe/otp,g-andrade/otp,getong/otp,getong/otp,rlipscombe/otp,mikpe/otp,mikpe/otp,RoadRunnr/otp,ferd/otp,bjorng/otp,lrascao/otp,erlang/otp,electricimp/otp,electricimp/otp,uabboli/otp,dumbbell/otp,erlang/otp,bsmr-erlang/otp,bjorng/otp,emacsmirror/erlang,electricimp/otp,jj1bdx/otp,vinoski/otp,bjorng/otp,mikpe/otp,legoscia/otp,legoscia/otp,bjorng/otp,dgud/otp,dumbbell/otp,RoadRunnr/otp,RoadRunnr/otp,isvilen/otp,erlang/otp,potatosalad/otp,bsmr-erlang/otp,dgud/otp,dumbbell/otp,legoscia/otp,electricimp/otp,potatosalad/otp,uabboli/otp,isvilen/otp,getong/otp,potatosalad/otp,jj1bdx/otp,RoadRunnr/otp,getong/otp,getong/otp,electricimp/otp,bsmr-erlang/otp,vinoski/otp,aboroska/otp,legoscia/otp,g-andrade/otp,dgud/otp,emacsmirror/erlang,erlang/otp,g-andrade/otp,getong/otp,isvilen/otp,kvakvs/otp,kvakvs/otp,vinoski/otp,RoadRunnr/otp,emacsmirror/erlang,legoscia/otp,bsmr-erlang/otp,mikpe/otp,bjorng/otp,uabboli/otp,isvilen/otp,emacsmirror/erlang,rlipscombe/otp,uabboli/otp,mikpe/otp,vinoski/otp,dumbbell/otp,isvilen/otp,isvilen/otp,vladdu/otp,isvilen/otp,erlang/otp,erlang/otp,dgud/otp,RoadRunnr/otp,vladdu/otp,dumbbell/otp,mikpe/otp,vladdu/otp,g-andrade/otp,emacsmirror/erlang,potatosalad/otp,lrascao/otp,lrascao/otp,kvakvs/otp,ferd/otp,getong/otp,kvakvs/otp,aboroska/otp,ferd/otp,vladdu/otp,vinoski/otp,g-andrade/otp,vinoski/otp,lrascao/otp,dumbbell/otp,vladdu/otp,lrascao/otp,aboroska/otp,jj1bdx/otp,bsmr-erlang/otp,ferd/otp,dumbbell/otp,mikpe/otp,erlang/otp,bjorng/otp,electricimp/otp,ferd/otp,isvilen/otp,vladdu/otp,legoscia/otp,potatosalad/otp,bsmr-erlang/otp,dgud/otp,vladdu/otp,vladdu/otp,aboroska/otp,aboroska/otp,bsmr-erlang/otp,mikpe/otp,uabboli/otp,kvakvs/otp,potatosalad/otp,aboroska/otp,g-andrade/otp,uabboli/otp,uabboli/otp,dumbbell/otp,rlipscombe/otp,potatosalad/otp,RoadRunnr/otp,dumbbell/otp,aboroska/otp,emacsmirror/erlang,dumbbell/otp,rlipscombe/otp,erlang/otp,lrascao/otp,potatosalad/otp,rlipscombe/otp,jj1bdx/otp,mikpe/otp,lrascao/otp,jj1bdx/otp,uabboli/otp,vinoski/otp,jj1bdx/otp,dgud/otp,bjorng/otp,g-andrade/otp,legoscia/otp,dgud/otp,uabboli/otp,isvilen/otp,rlipscombe/otp,kvakvs/otp,emacsmirror/erlang,vinoski/otp,potatosalad/otp,g-andrade/otp,bjorng/otp,erlang/otp,jj1bdx/otp,jj1bdx/otp,dgud/otp,bjorng/otp,kvakvs/otp,emacsmirror/erlang,isvilen/otp,legoscia/otp,jj1bdx/otp,g-andrade/otp,ferd/otp,rlipscombe/otp,emacsmirror/erlang,erlang/otp,kvakvs/otp,getong/otp,RoadRunnr/otp,vladdu/otp,electricimp/otp,rlipscombe/otp,ferd/otp,jj1bdx/otp,emacsmirror/erlang,bjorng/otp,mikpe/otp,RoadRunnr/otp,aboroska/otp,electricimp/otp,aboroska/otp,dgud/otp,bsmr-erlang/otp,lrascao/otp,vinoski/otp,vinoski/otp,getong/otp,rlipscombe/otp,dgud/otp,lrascao/otp,bsmr-erlang/otp,getong/otp,ferd/otp,g-andrade/otp,legoscia/otp,electricimp/otp