Use ni_log_facility instead of referencing ni_debug

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Add ni_debug_timer to trace internal timer

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Use ni_debug_timer instead of ni_debug_socket

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Add ni_debug_timer calls

Signed-off-by: Olaf Hering <olaf@aepfle.de>