Add a signal handler so we can nicely run module unload code on shutdown

I go ahead and run the main_loop always in a child thread, because it
makes it more like the old mavproxy behavior.  If a daemon I check every
100ms if we have been asked to quit.

I only catch SIGINT if we are not running in interactive mode
name threads for easier profiling/debugging
Add a compdebug bitmask setting which can be used to turn off code

for profiling purposes
Add --profile option to allow running mavproxy under the yappi profiler.

Note: I used yappi because the cprofiler doesn't automatically handling
profiling child threads.  Yappi does.

I'm careful to only do the import if the --profile is passed in, so that
mavproxy won't break on platforms where that lib is not installed.
Make packet inspection use sets, for slight speed improvement

About 1% on an Edison.