Add AICurlInterface::getNumHTTPRunning

Replaces LLTextureFetch::getNumHTTPRequests.
Returns AICurlInterface::Stats::running_handles.
This is work in progress that temporarily doesn't compile because
LLTextureFetch::getNumHTTPRequests is still being used somewhere.
Add a 'size' to command_queue.

This adds a size (command_queue_st::size) to the ThreadSafe deque<Command> that was
AICurlPrivate::command_queue that is kept equal to the number of 'add'
commands in the deque minus the number of 'remove' commands in the
deque. The deque itself is now command_queue_st::commands.
Add PerHostRequestQueue::sTotalQueued

The new variable is updated to contain the sum of the size of
PerHostRequestQueue::mQueuedRequests of every PerHostRequestQueue
object, and thus the total number of queued requests for all hosts
together.

Also added PerHostRequestQueue::host_queued_plus_added_size() which
returns the the sum of queued requests plus the requests already added
to the multi handle for this particular hostname.
Removal of HTTPRequestRate and dead code.
Added MultiHandle::sTotalAdded

This new variable is updated to contain the total number of requests in
MultiHandle::mAddedEasyRequests. It can be a static because MultiHandle
is a singleton (there is only one curl thread) and it has to be an
(atomic) static because we don't want to need to take the lock on
MultiHandle for accessing this variable.
Moved PerHostRequestQueue[Ptr] outside of AICurlPrivate.

Renamed PerHostRequestQueue and PerHostRequestQueuePtr to
AIPerHostRequestQueue and AIPerHostRequestQueuePtr respectively and
moved them to global namespace. This in preparation for using them in
the texture fetcher (as function of the hostname of the url that is
contructed there).
Move extract_canonical_hostname to AIPerHostRequestQueue::extract_canonical_hostname.

This to make it available to the texture fetcher.
Added AIPerHostRequestQueue::queued_commands()

Returns the number of add commands minus the number of remove commands
in the command_queue for this host.
Print info in texture console about curl request queuing

This includes also non-texture requests (not sure if it's worth it to
explicitely separate this data for just textures).

The texture console now prints: HTTP:c/q/a/r
Where, c = number of 'add' request commands in the command queue
(minus the number of 'remove' request in the command queue and not
taking into account the command_being_processed, nor entirely being
thread-safe with regard to adding requests to 'q' or 'a' next: it is
possible that a request is no longer counted in 'c' but not yet is added
to 'q' or 'a'.
q = number of queued (throttled) requests (by the curl thread).
a = number of actually added requests (to the multi handle).
r = last returned value of 'running handles' by libcurl.

Obviously, c and q should be small (0 or 1) most of the time and a and r
should be equal and maxed out. This turns out to be the case.
Added LLTextureFetchWorker::PerHostPtr

Points to the AIPerHostRequestQueue instance corresponding to the
hostname in LLTextureFetchWorker::mUrl. This is basically a cache as we
could of course just retrieve that instance from mUrl at any time,
everytime. Needed in a future commit.
Compile error fix.

Cannot pass non-trivially copyable type std::string through '...'.
Move decision whether or not to add new HTTP request from texture fetcher to AICurl

After commit things compile again :).
The HTTP bandwidth throttling is not yet implemented. I'll put a
temporary fix back the next commit that just does it the "old way"...
Temporarily add old bandwidth throttle method back.
Use host:port as key for the "PerHost" request queue, instead of just the hostname.

Rationale: LL is doing all throttling per service (host:port), not per
service hostname. Also, textures and capabilities use the same host: the
sim you are connected to. Splitting the queues up on a per-service basis
will stop the textures from blocking a capability request.
Renamed aicurlperhost.{cpp,h} --> aicurlperservice.{cpp,h}

Next commit will rename everything else.
PerHost became PerService

Reflect the fact that we include port number in its name.
Rename HTTPTimeout::sClockCount (in clock ticks) to sTime_10ms (in 10ms units).

Note that HTTPTimeout::sClockWidth is no longer used for HTTPTimeout (as
if it's value became a constant of 0.01, the fraction 10ms / 1s).
A new variable, HTTPTimeout::sClockWidth_10ms is used to calculate
sTime_10ms (only).

Also HTTPTimeout::mStalled and HTTPTimeout::mLowSpeedClock changed units
to the same as of sTime_10ms (time since epoch in 10ms units).
Compile fix for libcwd
Add support for Avination's "Upload Credits"
Merge branch 'master' into Avination-4.0