rtapi/msgd: add global heap to global segment

eventually this should be size-configurable with a startup option
rtapi/heap: build support in rtapi/Submakefile
rtapi/heap: build support in hal/lib/Submakefile

the heap routines do not go through rtapi_switch since technically
they work with any memory region; the global heap needs the global segment
though and will work only after hal_init() when used from the HAL library.

Also, fix useless profiling definitions.
rtapi/heap: build support in src/Submakefile

make the includes available.
rtapi/heap: demo component using rtapi_malloc/free from RT
src/Makefile: drop -Os, fix profiling

known to tickle gcc bugs, and of dubious value
emc/sai: dummy canon layer nullcanon.cc - for interpreter profiling

to cut out any canon overhead from profiling and timing, and measure
interpreter parsing speed only

to build the standalone interpreter (rs274) with dummycanon, do like so:

rm ../bin/rs274
make ../bin/rs274 USE_NULLCANON=1

to profile the interpreter, install gperftools:

   apt-get install libgoogle-perftools-dev google-perftools

Note this works without profiling compile flags like -pg.
While old Makefile flags&options suggested to use gprof, this is
completely useless because gprof does not work for shared libraries
and the interpreter is in fact loaded from a shared library (librs274.so).

To profile:

CPUPROFILE=rs274.prof LD_PRELOAD=/usr/lib/libprofiler.so ../bin/rs274 -g <ngcfile>

To analyze:

google-pprof --text ../bin/rs274 rs274.prof |less
 or
google-pprof --cum --text ../bin/rs274 rs274.prof |less
json2pb: track commit d08c7fd5 in https://github.com/shramov/json2pb

fixes Memory leak in json -> pb conversion
tutorial: motorctrl demo
tutorial: basic remote component example
hal/cython/ring: add ring_const.pxd

A change from cython 0.19 to 0.20 required making symbol import based on enum typedefs
just #defines give too much problems
hal/cython: fix visibility of hal_ring.pxd symbols
hal/cython: remove build artefact machinekit/hal.c
tutorial/motorctrl: reduce logging, change webtalk port number

on the bb writing lots of log to the SD disk causes erratic HAL
behavior, and the gladevcp component shows 'hunting' in the position

The port number 8080 is not a good choice - an apache2 default install
will use it, leading to a collision
machinetalk/webtalk: add [WEBTALK]OPTIONS=<int> (to deal IPv4only hosts etc)

[WEBTALK]

# suppress IPV6 - or bind will fail on ipv4 only hosts
# affects raspberrys
# see https://github.com/warmcat/libwebsockets/blob/master/lib/libwebsockets.h
# enum libwebsocket_context_options {
#       LWS_SERVER_OPTION_REQUIRE_VALID_OPENSSL_CLIENT_CERT = 2,
#       LWS_SERVER_OPTION_SKIP_SERVER_CANONICAL_NAME = 4,
#       LWS_SERVER_OPTION_ALLOW_NON_SSL_ON_SSL_PORT = 8,
#       LWS_SERVER_OPTION_LIBEV = 16,
#       LWS_SERVER_OPTION_DISABLE_IPV6 = 32,
#       LWS_SERVER_OPTION_DISABLE_OS_CA_CERTS = 64,
#};
OPTIONS=32
haltalk: add keepalive MT_PING on halrcomp and halgroup PUB channels

currently a comp or group cant tell if the publisher has gone away, or
just has nothing to say. Publishing a keepalive message on all topics
for both sockets enables clients to determine server liveness.

Default value 2000ms.
use the '-K|--keepalive <msec>'  option to set this interval.
Set to 0 to disable keepalives.
lib/machinekit: added launcher library
lib/machinekit/launcher: using mod_ext
lib/machinekit/launcher: added more options to rip_environment
scripts/rip-environment: deactivated complete and changed sytax to fix execution in non-bash environments