flimflam: Fix compilation errors when compiling with glib 2.32.

This CL makes the following changes to make the code compatible with
glib 2.30 and 2.32:
- Include glib.h instead of glib/ghash.h as the latter should not be
  included directly.
- Use g_ascii_strcasecmp() instead of g_strcasecmp() for
  case-insensitive comparison of ASCII-only strings. g_strcasecmp() has
  been deprecated.
- Use g_atomic_int_add() instead of g_atomic_int_exchange_and_add().
  g_atomic_int_add() is identical to g_atomic_int_exchange_and_add()
  since glib 2.30 where the latter has been deprecated.
- Use g_io_channel_read_chars() instead of g_io_channel_read() for
  reading binary data from an unbuffered GIO channel without encoding.

BUG=chromium-os:34103
TEST=emerge flimflam with glib 2.30.2 and 2.32.4

Change-Id: I6333472ba8071566de3d0eafd446bcc58f003062
Reviewed-on: https://gerrit.chromium.org/gerrit/32655
Commit-Ready: Ben Chan <benchan@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
8 files changed