Support timeouts in milliseconds for Curl client.

If timeout is less than 1 second, we calculate milliseconds and set
CURLOPT_TIMEOUT_MS option instead of CURLOPT_TIMEOUT.