Don't exit premature from gg_gethostbyname_real()

POSIX.1 says it's undefined effect to use 'return' before pthread_cleanup_pop()

This also fix buf memleak.
Merge pull request #11 from darkjames/for-libgadu-1.12

Don't exit premature from gg_gethostbyname_real()
Fix autotools warnings (for the newest version)