Make GLib dependency optional

MIO itself can now be built without GLib if vsnprintf() and va_copy()
are available (e.g. on a C99 system), and the dependencies are not
exported through the headers.

The test suite currently still depends on GLib, but won't be build it
not available.
Fix test for mio_read()

mio_read() return the number of elements read, not the number of bytes.
Add test for partial reads
Improve memory backend of mio_read()

Drop the loop in mem_read() in favor of a single memcpy() call.

This greatly improves performances when nmemb > 1, for a small loss
for some values of size when nmemb == 1.  Gain can theoretically be
infinite since swapping nmemb and size parameters changes almost
nothing while it had a dramatic performance impact previously.  Loss
is up to about 25% in the worst case for some values of size when
nmemb is 1.

Also, now the function always copies as much data as possible, not only
whole blocks.  This follows the glibc implementation of fread() and
simplifies the code.  Doing so also fixes the position after a partial
read to be at the last readable character rather than the end of the
last read block.
Fix support for recent Automake versions