Move helper functions to target specific directories

They don't belong to the generic code.
Add socket file descriptor to macan_ctx

This simplifies the code, because the "s" parameter was needed almost
everywhere. Because the macan_ctx needs to be passed everywhere as well,
this change reduces the number of parameters of most functions by one.

This change will also be handy during planned conversion to an event loop
library. It will be sufficient to pass just one parameter (ctx) with every
event, instead of two.
Extend print_msg to also print node ID

This is useful for decoding output of ./test/4signals.wv.
Convert fail_printf to use print_msg

Now, all messages have prepended node id.
Comment out or remove unneeded debug messages
Convert the code to use libev (event loop library)

The goal here is to be able to run multiple nodes in the same
(single-threaded) process to make testing and debugging easier.

Linux version seems to be fully converted and 4signals demo works. TriCore
version is currently broken. The plan is to implement macan_ev_* functions
for TriCore to provide basic functionality of libev.

Now, most of the time and key server code is in libmacan. The binaries
keyserver and timeserver are only responsible for command line parsing and
initializing macan based on the parameters.
Use MACAN_EV_DEFAULT instead of EV_DEFAULT from libev
Rename macan_write to __macan_send_sig

In future I want macan_write to be a CAN frame send primitive.
Replace write() with macan_send()

It is better to use macan specific API than reusing POSIX API for
(non-POSIX) TriCore implementation.
Replace EV_READ with MACAN_EV_READ
Implement primitive event loop for TriCore

The tricore project compiles without problems, but it has not be tested on
real hardware (yet).