Support timeouts in milliseconds.

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