Add a test for g_signal_get_invocation_hint

This is the sole piece of code in GLib where we make use of the
stack growing direction. And this test proves that we have been
getting the direction wrong all these years...
Fix the configure check for growing stack

The check was getting the direction wrong, as proven by the
just committed signal invocation hint test.

https://bugzilla.gnome.org/show_bug.cgi?id=711871
Improve stack direction detection

When the function in the test program is inlined, all bets are
off whether the detection will work correctly or not. Make it
harder for the compiler to play games on us by making the
function recursive.

https://bugzilla.gnome.org/show_bug.cgi?id=307947