proto_read_attribute_array: When count is zero, make result a NULL ptr.

I am a bit uncertain about this change, since both NULL and non-NULL
will make test cases fail within the SoftHSM test suite for example
(some SoftHSM C_ functions want the pointer to be NULL when there
are no attributes, and some allow (expect) it to be possible to pass a
non-NULL pointer with a zero count).

It seems that making it a NULL pointer when the count is 0 is the most
sensible thing though. How could the C_ function use the data pointed
to by the pointer, when the count says there is no data there? The
result would really be undefined.
clang reported setting src = dup twice
clang reported using attrlen uninitialized when parsing fails
Avoid compiler warnings when passing ints to IN_ULONG_BUFFER.
Add IPv6 support to listener.

Resolve host/service to listen on using getaddrinfo().
Move _parse_host_port to gck-rpc-util (and rename).

New name : gck_rpc_parse_host_port().
rpc_C_Initialize: remove redundant code.
Use getaddrinfo(). This adds IPv6 as well as fallback support.
_connect_to_host_port: Add missing break statement.
Log connecting client IP and port.
Ask p11 module to use OS locking.

Since p11proxy is a threaded application, the underlying p11
module should do locking (the proxy does no locking).
Add XXX comment about mutexes in init_args.
rpc_C_CloseAllSessions: Only close sessions opened by this thread.

Threads on pkcs11-proxy map to applications rather than threads in the
PKCS#11 (v2.2) specification. It is therefor important to not close
sessions opened by other threads in C_CloseAllSessions.
Guard against NULL from byte buffers/arrays.

Two potential issues reported by clang.
init, tool used to inspect on-the-wire p11proxy talk.
C_InitToken: label is not NULL terminated

PKCS#11 v2.2 is very clear that the 'label' argument provided to
C_InitToken is *not* necessarily NULL-terminated, but rather of
fixed size (32 bytes) and whitespace-padded.
Remove deprecated code to pass NULL strings.

Code to pass NULL strings was only used in C_InitToken, but since
the argument there was really space padded and not NULL terminated,
this code is no longer needed.
Add XXX comment about UTF-8 (space strings) in byte buffers.
Merge pull request #8 from fredrikt/master

more stuff