Linux: stop libevent from pre-allocating huge arrays.
Linux: stop libevent from pre-allocating huge arrays.

Currently, libevent allocates two structures of size RLIMIT_NOFILE
(which is 8192 on Ubuntu) and so these end up being several hundred kB
of memory for each MessageLoopIO.

This patch changes the default size to 32. If the thread watches a
file descriptor greater than 32, the arrays will be grown as needed,
doubling each time.

Also fixes a typo in the upstream code. A bug report for this has been sent
upstream.

http://codereview.chromium.org/118126
BUG=11999


git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@17436 0039d316-1c4b-4281-b951-d872f2087c98

gavinp/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,ropik/chromium,adobe/chromium,adobe/chromium,adobe/chromium,ropik/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium