Add explicit cast to setsockopt() calls

Implicit cast from size_t* to const char* throws an error on some compilers.
Fix type checks in CMake

Use CHECK_TYPE_SIZE to check existence of types.
Cleanup include statements

Remove useless includes and add some preprocessor conditions for platform specific headers.
Add dummy implementation when strerror() is missing

Use a simple empty string for platforms without an implementation.
Correctly server non-ASCII filenames on Windows

Convert the filename from UTF-8 to UTF-16 and use CreateFileW() to open the file.
Enable compilation on Windows CE

Add a few ifdefs to support this additional platform.
fix missing include for time

Signed-off-by: Andy Green <andy.green@linaro.org>
Allow setting the HTTP proxy via creation info

If the user provides a proxy via the info object it is used
in favor over the http_proxy environment variable.
Check if getenv() exists

Do not call getenv() on platform which do not support it
WSAGetLastError() instead of errno on Windows

Error codes set by Windows Sockets are not made available through the errno
variable. Checking them via WSAGetLastError() is the corret solution.
Remove duplicated implementations for bzero()

Define bzero() in a central place if HAVE_BZERO is not set
Fix cyassl flags, update documentation