Fixes a number of issues with ProcessSingletonLinux. (1) Use nonblocking sockets.  Blocking the IO thread is bad. (2) Handle multiple SocketReaders. (3) Stop leaking file descriptors in SocketReader.  Old code used to stop watching the fds, but not close them. (4) Handle partial reads and writes.  SocketReader reads until the sender shuts down his side of the socket. (5) Timeout readers after 5 seconds so they don't hang forever. BUG=http://www.crbug.com/12343 TEST=Open a chrome instance.  Check /proc/<pid>/fd/ to see how many descriptors there are.  Run "chrome www.google.com" on the command line a bunch of times, which should create a bunch of tabs.  Make sure you close all these new tabs that pop up.a  Check /proc/<pid>/fd/ to see how many descriptors there are.  There shouldn't be many more (although some of the new renderers that got created take awhile because they get cleaned up).  Keep repeating, you should be at a steady state of file descriptors.
Fixes a number of issues with ProcessSingletonLinux.
(1) Use nonblocking sockets.  Blocking the IO thread is bad.
(2) Handle multiple SocketReaders.
(3) Stop leaking file descriptors in SocketReader.  Old code used to stop watching the fds, but not close them.
(4) Handle partial reads and writes.  SocketReader reads until the sender shuts down his side of the socket.
(5) Timeout readers after 5 seconds so they don't hang forever.
BUG=http://www.crbug.com/12343
TEST=Open a chrome instance.  Check /proc/<pid>/fd/ to see how many descriptors there are.  Run "chrome www.google.com" on the command line a bunch of times, which should create a bunch of tabs.  Make sure you close all these new tabs that pop up.a  Check /proc/<pid>/fd/ to see how many descriptors there are.  There shouldn't be many more (although some of the new renderers that got created take awhile because they get cleaned up).  Keep repeating, you should be at a steady state of file descriptors.

Review URL: http://codereview.chromium.org/112054

git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@16811 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser