rtapi/Submakefile:  HACK  build rtapi/sim_rtapi_app.cc with -DRTAPI

from Submakefile:
+# HAAACK:
+#
+# Build objects/rtapi/sim_rtapi_app.o in Makefile as other USERSRCS,
+# but replace -DULAPI with -DRTAPI:  Makefile doesn't handle -DRTAPI
+# C++ sources

Need RTAPI build for rtapi_set_msg_handler()
Merge rtapi/rtapi_support.h back into rtapi.h

Why was this pulled out?
Move kernel compat logic from hal_lib.c to rtapi_compat.c

FIXME: code in rtapi_main.c looks almost identical, but with incorrect
logic (we want to know if (flavor_id == RTAPI_XENOMAI_ID &&
!kernel_is_xenomai())).