renamed SocketUtil to CloseUtil and added some overloads
cleaned up several finally clauses with close wrapped in a nested try