Cleanup Socket class and remove it from the platform files.

Move the Socket class to dedicated platform/socket.{cc,h} files.
Cleaned up the implementation to allow for more code sharing.

R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/23484014

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Fix race conditions in cctest/test-debug.

R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/23797003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@16522 ce2b1a6d-e550-0410-aec6-3dcde31c8c00