WIP: Make curl thread code robust and flexible.

Conflicts:

	indra/llmessage/llcurl.cpp
	indra/llmessage/llcurl.h
	indra/newview/app_settings/settings.xml
	indra/newview/llappviewer.cpp
	indra/newview/llmeshrepository.cpp

Resolved:

	indra/llmessage/llcurl.cpp:

	  Basically removed (not used anyway)

	indra/llmessage/llcurl.h:

	  Basically removed (just includes aiculr.h now)

	indra/newview/app_settings/settings.xml:

	  CurlUseMultipleThreads was remvoved.
	  CurlMaximumNumberOfHandles and CurlRequestTimeOut
	  are still in there, but unused at the moment.

	indra/newview/llappviewer.cpp:

	  CurlMaximumNumberOfHandles and CurlRequestTimeOut
	  are unused at the moment.

	indra/newview/llmeshrepository.cpp:

	  Lock mSignal always (is unlocked inside wait()).
	  Use mSignal lock to see if we are waiting; remove mWaiting.
	  Return false from the MeshFetch functions iff we have to retry
	  a HTTP fetch. Catch the error exception thrown by getByteRange
	  instead of using it's return value (always returns true
	  anyway).
Always set proxy settings for every HTTP curl connection.

Move applyProxySettings to CurlEasyRequest and call it from
applyDefaultOptions.

Use AIThreadSafe for LLProxy for a more robust threadsafeness.
(This forces correct locking, checks that the unshared vars
are indeed unshared and made it easy to use read/write locking,
which might be important in this case (we do a lot of read-only
accesses to it).
Grabbed openSSL-1.0.0d from upstream for linux, necessary for non-standalone compiles.

Also brought in linux64 version I had sitting around, collecting dust.
Spelling fixes and stuff like that to AICurl* and llproxy.* documentations

Also removes a duplicate include from llares.cpp

Conflicts:
	indra/llmessage/aicurl.cpp
Fix libcurl version check.
Add support for libopenSSL older than version 1.0.0.
Merge remote-tracking branch 'lirusaito/curlthreading2' into curlthreading2
Turn llassert[_always] into a (single) statement and print line nr in decimal.
Use correct way to check if we logged in yet or not.

Without this fix, we trigger an assert, in debug mode, that was added
to Singularity exactly to find out if we called functions like
getExpandedFilename(LL_PATH_PER_SL_ACCOUNT ...) before logging in.
Checking if THAT function returns empty() is clearly not safe, but
very error prone.
Merge branch 'V2MultiWear' into curlthreading2

I picked a few non-curl related patches from curlthreading2
and applied them to V2MultiWear. Now merging back to avoid
collisions for others.
Code hardening, review, bug fixes, documentation, curl stats and cleanup.

Bug fixes:
AICurlEasyRequestStateMachine didn't delete itself.
curl_multi_socket_action calls were made for potentional removed sockets.
The curl thread wasn't terminated.
Added some windows code.

Iterating directly over the elements of fd_set::fd_array in
windows is faster than using FD_ISSET.
Bug fix
Merge branch 'curlthreading2' of git://github.com/AlericInglewood/SingularityViewer into curlthreading
Fix building with libcwd
Improved layout of curl stats print out.
Print the curl library found during configure.

Prints something like:
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.25.0")
New libcwd channel 'curlio'.

Enable printing of libcurl 'IO' debug messages when libcwd channel
'curlio' is turned on (added to .libcwdrc). Avoiding a recompile.
Merge branch 'curlthreading2' of git://github.com/AlericInglewood/SingularityViewer into curlthreading
Try to be smart about not printing garbage (binary) received from the server.