configure.ac: detect whether libcurl supports curl_multi_wait()

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: call appropriate curl calls for waiting on sockets

If libcurl supports curl_multi_wait() then use it, otherwise
use select() and force a timeout, even if it has been disabled.
Otherwise we may wait forever for events that we can't wait for
as select() only uses fds < 1024.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>