Remove some dead code.

Patch by Paul Crawford <psc@sat.dundee.ac.uk>
Paul also added missing closedir() calls.
No need to allocate memory that is already statically allocated.

Patch by Paul Crawford <psc@sat.dundee.ac.uk>
Fixed two small oversights that Coverity is bitching about.
Some changes for newer autotools
Re-created watchdog default file for Debian. It got lost somewhere on the way.
Also added an option to configure whether or not wd_keepalive should be started
after stopping watchdog.