Add ssa_signal_handler.c under shared subdirectory

SSA signal handler allows for proper error reporting that
make us able to reproduce and fix bugs.
ssa_set_ssa_signal_handler() function initiates the signal
handler.
The handler dumps the stack backtrace to SSA log. ssa_open_log
function creates the log. Before the function call, the log
is NULL and no backtrace is dumped.

The signal handler grabs a stack using two different ways.
1. System backtrace call.
   See http://linux.die.net/man/3/backtrace
   The function returns binary names, shifts and symbols. The symbols
   are taken from dynamic symbol name.
   Use -rdynamic option to gcc, which makes it pass a flag to the linker
   which ensures that all symbols are placed in the table.
   We use addr2line utility for translation shift to location is source.
   If the utility install the signal handler will launch it and translate
   a shift in binary file to the source file and line number.
   The signal handler dosen't print 3 top frames in stack which corresponded to
   internal functions used for backtrace dumping.
   Using backtrace we get only stack for current thread.
2. gstack ustility.
   See http://linux.die.net/man/1/gstack
   The utility prints a stack trace for all running threads.
   The signal handler launch the utility only if it exist on the computer.

ssa_signal_handler.c includes two testers. First one checks
run_cmd function. Use _SSA_RUN_CMD_TESTER define for building
the tester. The second one checks the signal handler in
multithreaded environment. Use _SSA_RUN_CMD_TESTER for compilation.

Examples:
backtrace output with addr2line:
==== [BACKTRACE] ====
3  0x40f387 in ssa_ctrl_run () from ssa.c:4079
4  0x4048da in distrib_ctrl_handler () from distrib.c:447
==== [BACKTRACE] ====

backtrace output without addr2line:
==== [BACKTRACE] ====
/lib64/libpthread.so.0() [0x33caa0f500]
/sashakot/usr/sbin/ibssa(ssa_ctrl_run+0x84) [0x40f097]
/sashakot/usr/sbin/ibssa() [0x4045ea]
==== [BACKTRACE] ====

gstack output:
==== [gstack BACKTRACE] ====
Thread 8 (Thread 0x7f7533f58700 (LWP 21754)):
0  0x00000033ca2db60d in read () from /lib64/libc.so.6
1  0x00000033ca271f68 in _IO_new_file_underflow () from /lib64/libc.so.6
2  0x00000033ca274e8d in _IO_default_xsgetn_internal () from /lib64/libc.so.6
3  0x00000033ca2676e2 in fread () from /lib64/libc.so.6
4  0x0000000000419394 in run_cmd ()
5  0x000000000041962a in ssa_print_backtrace_with_gstack ()
6  0x00000000004197c7 in ssa_print_backtrace ()
7  0x0000000000419321 in ssa_signal_handler ()
8  <signal handler called>
9  0x000000000040f387 in ssa_ctrl_run ()
10 0x00000000004048da in distrib_ctrl_handler ()
11 0x00000033caa07851 in start_thread () from /lib64/libpthread.so.0
12 0x00000033ca2e890d in clone () from /lib64/libc.so.6
Thread 7 (Thread 0x7f753334e700 (LWP 21755)):
0  0x00000033ca2df253 in poll () from /lib64/libc.so.6
1  0x00007f753418f314 in rpoll () from /sashakot/usr/lib/librdmacm.so.1
2  0x00000000004089ff in ssa_upstream_handler ()
3  0x00000033caa07851 in start_thread () fro/usr/bin/gstack 21753
==== [gstack  BACKTRACE] ====

Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Use ssa_signal_handler in SSA components

Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>