Improve portability of backtrace.cpp (#2924)
Improve portability of backtrace.cpp (#2924)

* Only use backtrace_symbols in execinfo.h if present: we correctly
  guard the call to backtrace, but not the one to backtrace_symbols.
* Do not prefix the function definition with the std namespace for the
  __throw* functions to avoid compilation errors if there is no
  corresponding function declaration in libstd.

Fixes #2698
See #2922

p4lang/p4c,p4lang/p4c,p4lang/p4c,p4lang/p4c,p4lang/p4c