pseudotcp: Also cause Writable callback to be emitted if can_send() says no

The GOutputStream based systems can sometimes call this, decide the stream is
not writable and then poll for it. We have to make sure that poll is woken up.
No need to strdup foundation in new_selected_pair since we queue signal
agent: Don't return the socket to the app in any reliable case
tcp-bsd: Don't clear error that hasn't been set
agent: Fix a leak in nice_output_stream_write() with a NULL cancellable

If @cancellable is NULL in a call to nice_output_stream_write(), the
WriteData struct is created with a reference count of 4, but only two
operations are scheduled which will result in its reference count being
decremented. The third operation is only scheduled if @cancellable is
non-NULL (and the final reference is dropped unconditionally at the end
of the function).

Fix this by properly implementing reference counting for WriteData,
rather than hard-coding the expected number of references in a fragile
and unmaintainable way.
agent: Limit printed length of uname and password in debug output

At this point in the code, neither the username nor password are
nul-terminated, so printing them in the debug output as nul-terminated
strings can easily result in rubbish being printed after them.

Fix this by specifying the string length in the printf() format string.
Finally my terminal will no longer ask me to install N’Ko fonts when
running the libnice tests.
agent: Factor out a tiny bit of common code
stun: Restore argument type to stun_usage_bind_process(), it's used outside libnice
agent: Fix leaks if a component is removed during a recv() call

If the error handling block in the middle of the recv() loop is hit,
various things were previously leaked (context, cancellable_source) and
the return values were potentially incorrect.

Fix the break out of the error handling block to clean up correctly.