Refactor the logging code.

The logging routines logprintf and logperror are copy-pasted all
over the place. Make a common implementation which all can use,
and get rid of the pasted copies.
daemons-lircd: Set the protocol for rc device used.

There are tons of descriptions how to echo lirc >
/sys/class/rc/rcX/protocols to make lirc work as intended. This is
needlessly complicated. This patch tries to locate the device used
presuming that if the device /dev/lircN actually refers to
/sys/class/rc/rcX there is a link /sys/class/rc/rcX/lircN. This is
not part of the stable kernel interface as I understand, but should
be good enough for now. If found, 'lirc' is just written to the
corresponding 'protocols' file.

If the driver is devinput, no protocol change is done. If the device
isn't an rc device the logic will try to set protocol but silently
fails since it will not find  a device link in the rc directories.

Existing wrapper scripts should not be a problem, doing this twice
does not make any difference.

The systemd installation is of course so much simpler not having
to cope with this stuff.

Conflicts:
	daemons/lircd.c
	systemd/lircd.service
Adding CCAN config file libraries (MIT licensed).
daemons: Add support for option file.

Adds a wrapper for the ciniparser module.
daemons: implement options file support in lircd and lircmd.

Hooks up the config file wrapper in lircd and lircmd. The file
/etc/lirc/lirc_options.conf now holds default values for all
options.
config: Adding default lircd.conf and lircmd.conf.

Install empty templates  the way distributions have been doing
since long. There's still code to override this if a single
driver is selected during build.

Supporting minimal configurations with one driver and one/two
config files should be possible anyway. But it's than about
automating the process to remove other drivers and to pick the
correct templates from remotes.

Conflicts:
	Makefile.am
systemd: simplify services using new capabilities.

The configuration file replaces the systemd environment files which
BTW are deprecated by systemd upstream. Since lircd can handle the
protocol reervation  the clumsy, eror-prone and hard to configure
core to echo the protocol can be removed.
contrib, doc: Add some irexec support.
Merge branch 'systemd':make lirc a well-behaved systemd client.

Adds things like a configuration file and automatic handling of protocol
selection in the rc device if applicable. Neither the manual
configuration of the  'echo lirc > /sys/class.../protocols nor handling
the program options as command line parameters fits systemd well.
Removing bt_829
Removing ttusbir.

Conflicts:
	configure.ac
Remove serial driver
Removing atiusb
Removing lirc_parallel
Removing lirc_sir
Removing lirc_imon.

Conflicts:
	configure.ac
	drivers/Makefile.am
Removing lirc_sasem.

Conflicts:
	configure.ac
	drivers/Makefile.am
Removing lirc_gpio.
Removing lirc_i2c.

Conflicts:
	configure.ac
	drivers/Makefile.am
Removing lirc_igorplugusb

Conflicts:
	configure.ac
	drivers/Makefile.am