add a test case for #3509

refs #3509
WIP: executed command on checks

refs #3810
Merge branch 'mfriedrich/core' of git.icinga.org:icinga-core into mfriedrich/core
core: fix host_check, last_check == next_check wrong in scheduling queue

this is one of those side effects when detecting orphaned checks, so in
order to solve the issue, remove workaround for the next_check of on
demand hosts, and look our if they occur on the orphaned checks again.

fixes #2195
core: fix triggered downtimes for child hosts are missing after icinga restart (thx Michael Lucka) #3390

basically, the issue is 2 folded:

- the downtimes are somewhat whackily sorted in memory after being read
  from status.dat/retention.dat
- that sort order (by start time) will not allow to to check for valid
  parent downtimes when a child downtime is considered valid or invalid

the patch changes the sort order of downtimes in memory and assumes that

- parent and child downtimes have the same start time
- downtime_ids are ascending, parent before child

requires further tests, thanks Michael Lucka for the patch and analysis.

refs #3390
core: fix services with empty hostgroups aren't processed even if it has host_name specified (allow_empty_hostgroups=1) (thx Viranch Metha) #3736

refs #3736
core: keep logfile open, reducing open/close performance decreases

the only caveat on this - when a kernel panic happens, the last fflush()
may be missed, since the buffers now reside on the kernel side, and we
do not open/close (commit) the log on every single line.

refs #3390
core: enhance illegal macro character processing performance

doing the checks on-demand in O(n*m) nested loops costs a heck of
performance when the macro should be cleaned from illegal characters.

by creating a map during initialisation, and only checking against that
will increase performance on macro processing overall.

kudos to Andreas Ericsson for the patch.

refs #3389
core: revamp USE_LTDL definitions in nebmods #3817

fixes #3817
core: add the notification type by string to debug logs; set CUSTOM=8, STALKING=9

fixes #3818
bail early if there aren't any illegal_object_chars defined

which saves some strcmp nops.

refs #3389
core: skip writing status.dat if explicitely set to /dev/null (e.g. when using alternate data retrieval methods like IDOUtils)

refs #3819
core: avoid writing objects.cache if set to /dev/null

refs #3819
core: increase performance on host->service relation counter (config reading, flapping)

when a service is checked against its host association we can already
update the relation counter as well as total check interval.

the first is required for the config pre flight check while the second
is used within flapping detection.

original patch by Andreas Ericsson, fixed for usage in Icinga.

refs #3820
fix tests in t-tap
idoutils: add executed command from core host/service status

this is the additional entry for getting the data from idomod over to
ido2db and all three database backends.

so we may use that with icinga web then.

refs #3810
refs #1137
Merge branch 'mfriedrich/core' into mfriedrich/feature-3810
update Changelog for refs #3810
Merge branch 'test/core' into next

Conflicts:
	docbook
	html/docs/de/index.html
	html/docs/en/index.html
fix copyright in docs