Decouple watchdog from compiler proxy through Pub/Sub.

Also fix some NPEs during tests.