Ensure a query is canceled, if a thread is about to be killed.

This fixes blocked Ruby when pressing CTRL-C for a blocking query in
the main thread.
Wrap PQnotifies per GVL.

PQnotifies doesn't do/wait for network communication, but PQnotifies can deliver
notifications per callback. The registered callback function is then called with GVL locked.
This results in a rb_bug("rb_thread_call_with_gvl: called by a thread which has GVL.")
if we don't wrap PQnotifies likewise in order to unlock the GVL.
Wrap PQnotifies per GVL.

PQnotifies doesn't do/wait for network communication, but PQnotifies can deliver
notifications per callback. The registered callback function is then called with GVL locked.
This results in a rb_bug("rb_thread_call_with_gvl: called by a thread which has GVL.")
if we don't wrap PQnotifies likewise in order to unlock the GVL.
Ensure a query is canceled, if a thread is about to be killed.

This fixes blocked Ruby when pressing CTRL-C for a blocking query in
the main thread.
All versions of PostgreSQL starting from 8.4 know DIAG_STATEMENT_POSITION and 8.3 is EOL.
Better spec for fallback_application_name.

The spec failed, if /bin/bash was more than 63 characters.
Update travis config.

Cross compile for i386-mingw32 on 1.8.7-p371 and x64-mingw32 on 2.0.0-p0.
Allow 'rake compile' and 'rake gem' on non mercurial repos.

rake-compiler-0.9.0.pre.1 depends on ChangeLog for the compile task.
Try to use -rpath linker option, even if RbConfig doesn't know about it.
Use async_exec for compat with Ruby-1.8
Merge branches 'fix-travis-tests', 'try-rpath-manually-if-rpathflag-is-empty', 'cancel-query-ubf' and 'wrap-pqnotifies-per-gvl' into debug-travis