shmdrv/Submakefile:  shouldn't need to link with RT_LDFLAGS

This kmodule is RT-flavor independent, but RT_LDFLAGS are specific to
flavors.
Move RTAI LDFLAGS back into configure.in
rtapi/Submakefile:  In rtapi build hack, simply symlink the directory

... instead of cp -rl.  This unbreaks Makefile dependencies when the
source file changes but the destination isn't updated.

.gitignore links rather than directories.

Mindless copying of earlier hacks (kbuild module separation hack) is
poor practice.  :P
WIP:  per-flavor rtapi_app_<flavor> executables:  separate building

For userland threads:  The module locating and loading system was an
invention necessitated by a single rtapi_app needing to load modules
built separately and placed in per-flavor directories.  Using
system-provided mechanisms is better.  Also, for non-RIP builds,
${exec_prefix} must be passed into config.h, but somehow it isn't
resolved in configure.in; the large distros will require installing
modules under ${libdir}, which expands to e.g. ${exec_prefix}/lib.

This commit builds a matching rtapi_app_<flavor> for each set of
userland modules, installing it under ${libexecdir}.

Next steps: fix module loading code to use built-in rpath; make any
adjustments to rtapi.conf/realtime scripts; test that non-RIP builds
work

Changes:

- rtapi/Submakefile:
  - Build multiple rtapi_app_<flavor> executables instead of one rtapi_app
    - Build tied into modules build
    - Fix CFLAGS to include RTFLAGS (and -DTHREAD_FLAVOR_ID)
  - Cleanups for readability
- Introduce libexec directory for non-public binaries '${libexecdir}'
  - rtapi_app_<flavor>, kdetect, flavor, rtapi_msgd binaries now live here
  - point rtapi.conf at new rtapi_app location

FIXME:  Makefile LDFLAGS needs investigation; -rpath arg looks fishy;
notes left in rtapi/Submakefile
Makefile:  fix setuid target for multiple rtapi_apps
configure.in:  no-op:  Fix description of EMC2_DEFAULT_TOOLTABLE
hal/classicladder/Submakefile:  remove 'suspicious line' (\t\n)
Fixes for non-RIP installs; replace rtapi.conf with rtapi.ini

non-RIP installs are plagued by autoconf's placement of literal
e.g. '${exec_prefix}/libexec' strings in substitution for
'@libexecdir@'.  This is ok for Makefile.inc and shell scripts, which
are able to expand these strings.

For config.h and other files, these are problems.  This commit pulls
some problematic hard-coded paths out of config.h and places them into
rtapi.ini after expansion in a shell script.

This is a WIP; python scripts still need to be taught to read the .ini
file, meaning the system is still unusable.

Another notable change is the old system of locating modules by
manually construcing absolute paths has been replaced with linker
rpaths.  This is related to the above quest for removing hard-coded
paths.

Detailed changes:

- rtapi.ini
  - in ${sysconfdir}/linuxcnc ($EMC2_HOME/etc/linuxcnc), RIP or not
  - two-(or three-)stage generation with gen-rtapi.ini.sh.in.tmpl
    - configure appends flavor data to flavor-agnostic .tmpl script
      - new data in _cfg_flavor_params m4 macro to support this
    - configure does usual variable substitution on .in script
    - rtapi/Submakefile runs gen-rtapi.ini.sh script to create rtapi.ini
  - new function get_rtapi_config() in rtapi.h reads params from rtapi.ini
- scripts/rtapi.conf removed
- realtime.in
  - reads rtapi.ini through inivar binary
    - LoadConfig() removed
  - some init logic moved here from old rtapi.conf
    - FIXME:  might be pulled out again, reusable by other scripts
  - find_module_path(), CheckKernel(), other module path logic removed
    - logic now in rtapi_compat.c via module_helper
  - obsolete CheckMem() function removed
    - RTLinux dead; RTAI now uses shmdrv common shared memory driver
- module_path() function now only needs module's basename as input
  - kmod extension and directory search path now handled internally
  - used in module_helper
  - module loading simplifications in halcmd_commands.c
- userland rtapi modules now dlopen()ed using rpath
  - sim_rtapi_app.cc simplifications; -R option removed
- ulapi.so now called ulapi_<flavor>.so, e.g. ulapi_rt-preempt.so
  - now loading module using rpath rather than manually constructing paths;
    therefore per-flavor ulapi.so modules must be in the same directory
  - hal_lib.c updated accordingly
- remove hardcoded paths; fix install paths in prep for distro pkging
  - move hardcoded paths out of config.h
    - values like '${exec_prefix}' are inserted verbatim into config.h
    - paths moved to rtapi.ini; new code to retrieve values
  - changes to install locations to conform with packaging guidelines
    - e.g. ${libexecdir}; see below
  - EMC2_SYSTEM_CONFIG_DIR *should* be the only hard-coded configurable path
    - set to ${sysconfdir}/linuxcnc; rtapi.ini lives here
    - passed in as macro -D definition to get_rtapi_config()
    - userland module paths now in rpath, so EMC2_RTLIB_DIR mostly not needed
    - other paths should be moved into configuration
    - FIXME rtapi.ini is a misnomer, since these paths are not rtapi-specific
  - EMC2_LIBEXEC_DIR:  for executables not run by humans
    - set to ${libexecdir}/linuxcnc/; currently contains:
      - module_helper, rtapi_app_<flavor>, pci_write, pci_read,
        flavor, inivar, kdetect, rtapi_msgd
      - FIXME:  this is not a complete list.
      - rtapi_app and module_helper paths defined in rtapi.ini
      	- updates in halcmd_commands.c
    - EMC_LIBEXEC_DIR added to RIP environment $PATH for convenience
  - EMC2_BIN_DIR:  migrating this macro out of code
    - halcmd_completion.c, halrmt.c
    - realtime script moved here from /etc/init.d
  - EMC2_RTLIB_DIR:
    - macro removed entirely; replaced with module_path() enhancements