Backport r373119 from 11 to go along with RAII_VAR support.

In order to use nested functions on some versions of GCC (e.g. GCC on OS X),
the -fnested-functions flag must be passed to the compiler. This patch adds
detection logic to ./configure to add the flag if necessary.


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/1.8@402192 f38db490-d61c-443f-a65b-d21fe96a405b