Rework debian/configure

(Apologies to Seb for trampling his hard work!)

The previous debian/configure script disallowed module packages from
building in some cases, even when all dependencies are satisfied:

- Building under a non-RT kernel, or an RT kernel with no headers
  installed:  script exits

- Under a supported RT kernel, flavors incompatible are not built

In addition, it supported a complicated legacy substitutions system of
which much could be replaced by dh_gencontrol and substvars.

This patch replaces debian/configure with a simpler shell script that
performs only one substitution in Build-Depends:, and replaces other
substitutions with substvars.  It also detects thread flavor deps
already installed on the system, and those detected are handled in the
same way as before, by appending control file fragments.

This configure script does lack the configurability of the previous
system: it assumes that posix and rtpreempt threads should always be
built, and also any other thread styles for which deps are installed.
However, this behavior should be easily changed.

In addition, this patch removes other legacy templates for simplicity,
since there was no use of templating in debian/*.files and
debian/rules is a Makefile.

Conflicts:
	debian/configure
Merge pull request #82 from zultron/mk-pull

Rework debian/configure
rtapi_msgd: use assert() without side effects

thanks to Jeff Epler.

fixes #77
scripts/runtests:  stop the fd musical chairs

This curious juggling of file descriptors caused a hang on Wheezy
amd64 posix and rtpreempt threads, halui-jogging test.  Preceding
tests passed.  All tests on i386 host passed.

After test.sh script exited (result 0), the runtests script hung,
apparently waiting for one of the 'tee' processes to finish.

This more direct construction fixes the hang and eliminates need for
'-o pipefail'.

fixes #83
halcmd_main.c:  send halcmd_info() messages to stderr, not stdout

halcmd_output prints to stdout; with halcmd_info going to stderr,
runtests can succeed running in debug mode

fixes #83
scripts/runtests:  don't dump the tty

The 'while ...; do ...; done < ...' construction creates a newly
forked process with no tty attached.  With no tty, instead of debug
messages going to stderr, they instead end up in /tmp/linuxcnc.*,
which is erased.

fixes #83
Merge remote-tracking branch 'zmk/mk-runtests-output' into unified-build-candidate-3

Conflicts:
	debian/configure
	debian/extras/linuxcnc.files
	debian/linuxcnc.files