Use USR2 signal to quit signal handling thread.
Use USR2 signal to quit signal handling thread.

Make use of USR2 signal to cleanly quit the thread which takes care of
incoming signals. When cleanup section in main is reached (after
readEvent returned [due to Quit being pressed]) USR2 signal is sent to
signal handling thread which in turn sets a flag to leave loop. Thus the
thread exits cleanly and we can join it. This makes valgrind happy!

TobiasHeinicke/samc