messages: Add a timestamp to internal messages in debug mode

When running in debug mode, and sending messages to stderr anyway, add a
timestamp to ease debugging. This also changes cfg_tree_compile_node()
to add a timestamp too in similar cases.

Based on a patch by Viktor Juhasz <jviktor@balabit.hu>.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>