rtapi/msgd: explicitly shut down rtapi_app if exiting

there is no point in rtapi_app continuing if rtapi_msgd exits for some reason.
This closes the situation where rtapi_msgd exits and rtapi_app hangs
around, giving troubles on next startup.
src/Makefile: replace directory omitted from install-dirs in a68a74d
install rsyslogd.conf file
deb/rules: drop the self-remaking parts

The code in debian/rules for rebuilding debian/control has been broken
since the start, and the code for re-running debian/configure is about
to be broken with the new changes demanded by the unified-build-candidate
branch.
deb/rules: remove unused python_version
deb/rules: dont need to care about BUILD_SYS

The -X argument to dh_fixperms says to eXclude linuxcnc_module_helper
when it's fixing the permissions on all our files.  But dh_fixperm won't
complain or fail if it doesn't find linuxcnc_module_helper, so we don't
need to do this substitution trick to tell it what to expect.
deb: dont ignore package-dirs we no longer build
deb: new debian/configure and debian/control*

This one's written in python instead of bash, and has a cleaner internal
structure.

This handles the flavored debs of the unified-build-candidate branch.

The new debian packaging produces linuxcnc.deb, linuxcnc-dev.deb,
and linuxcnc-doc-*.deb, just like before, and in addition produces
linuxcnc-$FLAVOR.deb for each flavor enabled by debian/configure.
The available flavors are:

    posix (what we used to call sim)

    rtai-kernel (what we used to call rt)

    rt-preempt

    xenomai (FIXME: not fully implemented yet)

    xenomai-kernel (FIXME: not fully implemented yet)

linuxcnc.deb depends on at least one of the flavor debs, and suggests
all of them (to make them easy to find in the package manager, mostly).
deb/conf: accept -a to mean -r

"debian/configure -r" is supposed to mean "configure for the running
realtime kernel", and "debian/configure -a" is supposed to mean "configure
for any realtime headers you can find on the system".

The buildbot ill-advisedly runs 'debian/configure -a', even though it
knows it's going to run runtests later (so the kernel it builds for must
be the one that's running).  So really -r would be more correct.

In practice it's fine because all the buildslave VMs only have one
realtime kernel installed, so there's no difference between -a and -r
on those hosts.

If someone cares strongly about the difference between the old "-a"
and the new "-a" we can reinstate it.

As an aside, it probably makes sense to add a "debian/configure --all"
option that examines the apt database and makes the dsc build-depend on
all *available* realtime kernel headers.
deb/control: get rid of ancient Provides in control

I think it's time to stop worrying about users upgrading from emc2.deb
packages.
deb/control: relax the Conflicts

The flavor packages should conflict with pre-ubc packages, but there's
no convenient way to specify that currently.

When we merge ubc into master we'll tag that point as 2.6.0-pre1,
and make the post-ubc debs conflict with linuxcnc < 2.6.0-pre1.
deb/rules: dont use cpio when cp will do

Debian Wheezy doesn't come with cpio by default, this commit lets us
not add a build-dependency on it.
give dlopen the path to the ulapi library

Normally dlopen() searches LD_LIBRARY_PATH and /lib and /usr/lib.  In rip
builds we set LD_LIBRARY_PATH and we could do the same in installed
scripts, but it seems simpler to teach ulapi where the files live.
put ulapi-$flavor.so straight into rtlib/, not lib, so the dlopen can look in EMC2_RTLIB_DIR
deb: add xenomai support
dont clean setuid bit on rtapi_app_xenomai
add a linuxcnc-test.deb, with all the tests in it

This commit is not ready yet.  FIXME:

    runtests gets installed gzipped and without execute permissions

    the runtests script tries to run scripts/rip-environment first thing :-/

The ubc branch has problems that our tests missed because we don't follow
the 'test like you fly' principle.

There are differences between run-in-place builds and installed builds,
and our current testing method only tests run-in-place, so we can miss
problems with installed configurations.  This commit adds a deb with
just our tests in it, so we can test installed programs too.
linuxcnc-test.deb: don't compress or clear execute permissions on the tests

FIXME: another problem with linuxcnc-test.deb is that the user doesn't
    have write permission to /usr/share/doc/linuxcnc/tests, so all the
    tests fail

With this commit, if i cp the tests directory to my home dir and edit
runtests to not try to source rip-environment, the tests start running.
Some tests pass.  Some still fail, and the runtests script itself falls
over part way into the test list.
tests/bitops.0/test.sh:  change include dir to /include from /src/rtapi

Theory:  tests ought not to depend on anything in /src/
hm2-idrom test:  fix "too many arguments" error

Introduced by Y.T. in c6b87eec.  :P

From build log:

+ test -f realtime.log.0 realtime.log.1 realtime.log.10 realtime.log.11 [...]
test.sh: line 29: test: too many arguments

(Also, fix difficult-to-read test)