core: close watchdog device if watchdog device is unspecified now
If a watchdog device was specified previously, and unspecified later and
PID1 is reloaded, then we need to close the device.
(cherry picked from commit 82d7a151db3f504fee705bcd0ded2fa0d64eafb2)