Fix use of snprintf (which does not exist on all platforms) in auth.c
by replacing it with xmpp_snprintf in order to be consistent with the
rest of the code. Also fixes compile error on MSVC.
Fix a bug where select() could fail due to negative max socket fd.

Connection objects in the disconnected state should not have their
fd taken into account when determining the maximum socket fd number,
as they are not set in the bitmask with FD_SET, and their fd could
be anything, even a wildly large or small number.
Fix error spam in event loop when no connections are open.

On Win32 at least, select() will immediately fail with an error if
there are no file descriptors to wait for (max == 0). In the simple case
of a single XMPP session and an event loop that runs only while the
connection is open, this isn't a problem, but doesn't work for more
complex scenarios.

Add some handling so that if xmpp_run_once is called and there are no
active connections, simply sleep for duration of the timeout and
return.
Move receive buffer size into a compile-time #define

In some circumstances it is useful to change the buffer size from the
hardcoded default of 4096, as xmpp_run_once will only process that many
bytes at most, even if more is available on the socket.

I generally change it to 16384 to match up with the buffer size used by
SChannel for TLS.
Add XML namespace support.
Merge branches 'snprintf_fix', 'eventfix1', 'event_enhancements' and 'namespace'