examples on Windows: check for WSAStartup return code

Fixes VS2012 code analysis warning C6031:
return value ignored: <function> could return unexpected value
examples on Windows: check for socket return code

Fixes VS2012 code analysis warning C28193:
The variable holds a value that must be examined
agent.c: check return code of MapViewOfFile

Fixes VS2012 code analysis warning C6387: 'p+4' may be '0':
this does not adhere to the specification for the function
'memcpy': libssh2 agent.c 330

Fixes VS2012 code analysis warning C6387: 'p' may be '0':
this does not adhere to the specification for the function
'UnmapViewOfFile': libssh2 agent.c 333
kex.c: fix possible NULL pointer de-reference with session->kex

Fixes VS2012 code analysis warning C6011:
dereferencing NULL pointer 'session->kex'. libssh2 kex.c 1761
packet.c: fix possible NULL pointer de-reference within listen_state

Fixes VS2012 code analysis warning C6011:
dereferencing NULL pointer 'listen_state->channel'. libssh2 packet.c 221
wincng.c: fix possible use of uninitialized memory

Fixes VS2012 code analysis warning C6001:
using uninitialized memory 'cbDecoded'. libssh2 wincng.c 553
wincng.c: fix possible NULL pointer de-reference of bignum

Fixes VS2012 code analysis warning C6011:
dereferencing NULL pointer 'bignum'. libssh2 wincng.c 1567
tests on Windows: check for WSAStartup return code

Fixes VS2012 code analysis warning C6031:
return value ignored: <function> could return unexpected value
wincng.c: fix possible invalid memory write access

Fixes VS2012 code analysis warning C6386:
buffer overrun: accessing 'pbOutput', the writable size is
'cbOutput' bytes, but '3' bytes may be written: libssh2 wincng.c 610
wincng.c: explicitly ignore BCrypt*AlgorithmProvider return codes

Fixes VS2012 code analysis warning C6031:
return value ignored: <function> could return unexpected value
examples: fixed mixed line-endings introduced with aedfba25b8
x11 example: check return value of socket function
libssh2_priv.h: Ignore session, context and format parameters