Audrius Butkevicius' "Counters" patchset.

Yeah I couldn't figure out how to cleanly apply the patches in
the format they were sent to the libssh list here:

  http://www.libssh.org/archive/libssh/2014-01/0000023.html

but with some manual tinkering was able to end up with this.
The last patch in particular wouldn't apply cleanly, possibly
because it's based on master (this branch is based off v0-6).
messages: emit pubkey failures to callbacks

With this change, errors encountered while processing public keys
in 'ssh_packet_userauth_request' will be propagated back up to the
user-provided 'auth_pubkey_function' callback.

For example, if signature validation fails, the user callback will
be invoked with a signature state of SSH_PUBLICKEY_STATE_WRONG.

Before this change, a failure in signature validation would not be
made explicit via the 'ssh_server_callbacks'.
channel: add ssh_channel_write timeout family
poll: ssh_event_set/get_fd_events
buffer: always start off with BUFFER_INIT_SIZE

Initialize all new buffers with a BUFFER_INIT_SIZE allocation right
off the bat, to avoid later byte-by-byte repeated realloc calls.
buffer: never realloc down in buffer_reinit

Never realloc buffers down to 127 bytes in buffer_reinit: during large
transmits, this causes a "realloc ping-pong" with the session out buffer
constantly being realloc'd down to 127 bytes, just to be realloc'd back
up to 32 kilobytes for the next packet send (for example).

Were the realloc behavior desired in buffer_reinit, it would be better
to issue a free followed by malloc (as-is, 127 bytes that we don't care
about are memmove'd to the new buffer).
packet: remove extra memset of 'padstring'
packet: elide two buffer_prepend calls into one

In packet_send2, rather that issue two separate buffer_prepend_data calls
(each of which may entail realloc + memmove + memcpy), elide the prepend
work into a single buffer_prepend_data: the header information is computed
locally, and a single 5 byte prepend operation is now done instead of
prepending 1, then 4 bytes.
buffer: reserve PACKET_SEND_HEADER_SIZE for packet_send2