examples on Windows: use native SOCKET-type instead of int

And check return values accordingly.
agent_connect_unix: make sure there's a trailing zero

... if the path name was too long. Reported by Coverity CID 89801.
silence multiple data conversion warnings
packet.c: i < 256 was always true and i would overflow to 0

Visualize that the 0-termination is intentional, because the array
is later passed to strlen within _libssh2_packet_askv.