Fix 64-bit compilation issues

Substitute raw integer to/from pointer casts with glib macros
GPOINTER_TO_INT and GINT_TO_POINTER.

Modify sort_comparator() to be fully qualified GCompareFunc
that returns negative/zero/positive instead of just 0/1.

Fix possible numeric overflow in msg_comparator().

Fix printf-style format string in dummy_bme test utility.

[dsme] Fix 64-bit compilation issues
Merge pull request #12 from spiiroin/fix_64bit_issues

Fix 64-bit compilation issues