Don't record deps in dry runs.

deps_log() is NULL during dry runs, so this fixes a crash. It also
matches ninja 1.2.0's behavior as far as I can tell.

Fixes issue #551.