Use select() instead of poll()

Change-Id: I7688990da579542cfa6de8f45857632cba6f72dc
Reviewed-on: http://review.couchbase.org/31579
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>