Implement GPollableInputStream in GMemoryInputStream and
GConverterInputStream, and likewise implement GPollableOutputStream in
the corresponding output streams.
https://bugzilla.gnome.org/show_bug.cgi?id=673997
The loop was using a GConverterResult variable where it meant to use a
gssize, and since GConverterResult was ending up as an unsigned type,
this meant the (res < 0) check always failed.
The name buffer_availabile was kinda confusing, so its been renamed
to buffer_data_size() to match buffer_data().
Also I added a comment to buffer_ensure_space because its behaviour
wasn't obvious.