Fixed position.txt not getting created if 'import hal' used in python remap code.

The Python hal module steals SIGTERM away from the handler set in milltask.
Milltask relies on getting SIGTERM from the 'liunxcnc' script (via 'kill') to
write out position.txt and exit. Milltask now looks to see if the SIGTERM
handler changed during init, then sets it back to its original handler which
in turn calls the thief's handler as well as exiting normally and writing
out the position.txt file.
Merge pull request #247 from jasonpenn/master

Fixed position.txt not getting created if 'import hal' used in python remap code. Fixes issue #244.
Fixed milltask segfault on exit caused by my previous commit of emctaskmain.cc.

I neglected to clear the sa_flags field of the sigaction struct.
Merge pull request #248 from jasonpenn/master

Fixed milltask segfault on exit
Fix printk() header inclusion for older kernels

This was tickled when `xeno_math` became the default math kmodule for
RTAI in #235, and Janos Bujtar tried building against the older kernel
packages distributed by the LinuxCNC project ([reported here][1]).

`printk()` was moved from `linux/kernel.h` to `linux/printk.h` in
[late 2010][2].  However, `linux/kernel.h` includes `linux/printk.h`.

Alternatively, `printk()` could be defined by including
`linux/module.h`.  I don't know which is better.

[1]: https://groups.google.com/forum/#!topic/machinekit/PXjZfJqOfPg
[2]: https://lkml.org/lkml/2010/11/9/606