DeadLockDetector only checks every 6 seconds, move Log.flush() call. Make time to count as a deadlock configurable.

Signed-off-by: Ross Allan <rallanpcl@gmail.com>