hal_lib: export flavor

hal_lib.c ULAPI detects or autodetects the current flavor
this information is needed by some using code, in particular halcmd
to do the right thing (call module_helper vs rtapi_app)

make it global for ULAPI using code. Including hal_priv.h is required.
ulapp/hal: adapt using code to inspect flavor
Makefile.inc.in:  fix -I/include (a second time)

What's the difference between these, then?

-ifdef RTDIR
+ifneq ($(RTDIR),)
flavor detection:  add '-b' argument for build_sys
Build system:  remove more variable cruft:  LYX and RTARCH
Makefile.modinc not in AC_CONFIG_FILES; now includes Makefile.inc

Instead of copying and pasting scads of lines into Makefile.modinc.in
from Makefile.inc.in, pull Makefile.modinc out of AC_CONFIG_FILES and
include Makefile.inc instead.

At the same time, fold RTDIR_INC into THREADS_RTFLAGS in configure.in