rtapi/rt-preempt: name the threads so HAL names show up in ps/top

example output: 3 threads created by 'loadrt threads ...':

mah@ubuntu-10:~/emc2-rtos/tests/hm2-idrom$ ps -Leo pid,tid,class,rtprio,stat,comm,wchan |grep 14050
14050 14050 TS       - SLsl rtapi:0         skb_recv_datagram
14050 14057 FF      98 SLsl base:0          hrtimer_nanosleep
14050 14058 FF      97 SLsl medium:0        hrtimer_nanosleep
14050 14059 FF      96 SLsl slow:0          hrtimer_nanosleep
rtapi_app: name the main thread properly in ps/top

whatever the executable's path name, the process name should always
come out as 'rtapi:<instance number>' so a particular RT instance
can be identified as running.
rtapi/rt-preempt: log HAL name at thread startup too
rtapi/rtapi_app: break long lines

This aids review by VT100 users.

Also, remove unused includes - System V IPC is history.
Fix tests/overrun

tests/overrun/test.sh creates a new test directory, then calls
runtests on it.  Commit 05c8f859 breaks this, since the realtime
script is called once from the outside runtests script and again from
the inside one.

Hack this by stopping realtime before the inner runtest run, and
starting it again afterwards.  Yowch!
halcmd: fix RT component path completion
halcmd/thread info: display rtapi flavor
beaglebone/pru: adapt .bin loading to new pathname scheme
rtapi_app: rename sim_rtapi_app.cc to rtapi_app.cc

this was overdue
rtapi_app: fix printf typing
scripts/realtime: let DEBUG environment variable override rtapi.ini
scripts/realtime: enable environment options to rtapi_msgd and rtapi_app

$MSGD_OPTS gets passed to the rtapi_msgd command line
$RTAPI_APP_OPTS gets passed to the rtapi_app command line
rtapi: export simple_strtol for RTAPI/userland too

this made the hm2_test load fail
tests/hm2_idrom: make it work with uthreads and new logging

dmesg is gone as far as RTAPI logging goes.

Do one RTAPI session per test, log to file, and investigate
file per test.
rtapi_common: fix export - RTAPI only
kernel autodetect: rework RTAI detection

/dev/rtai_shm isnt used anymore, and it would have required the RTAI
modules to be insert to reliably detect RTAI.

Instead, use differences in the /proc/ipipe directory to tell RTAI from
Xenomai:  Xenomai has /proc/ipipe/Xenomai and /dev/rtheap both of which
RTAI doesnt have; so use this difference for now

This is going to remain heuristic.
linuxcnc.in:  remove obsolete test for KERNEL_VERS

Breaks linuxcnc.  This whole script needs to be revisited.