Restore modified times more frequently when cleaning env

We have been using Webpack which has a built-in file watcher.

When using the Webpack watcher along with overcommit, we were noticing
that after every commit we were making, the compiled Webpack bundle
would not contain the changes from that commit.

By default, this watcher has a 200ms delay on file changes before it
actually starts rebuilding, which is good enough for standard
development. However, because of the way that overcommit plays with the
working tree, our Webpack bundle was getting compiled without the
changes from our most recent commit.

This is happening because Webpack looks at the modified times of the
files to determine if something has changed. If the modified time of the
file is greater than the time that Webpack started watching, it
registers as a change. Since overcommit is changing the modified times,
this gets messed up.

My theory is that the amount of time that elapses from the start of
cleaning up the environment until the end of cleaning it up is greater
than our Webpack watchDelay.

We could probably resolve this by raising the watchDelay, but that slows
down our standard development which I would prefer to avoid doing.
Instead, it seems that if we restore the file modification times after
every step when cleaning up the environment in overcommit, we can have a
lower watchDelay without the negative side-effects described above. I do
realize that this is not a full fix, but it should help.

Webpack is currently working on building a new watcher [1], which may
also resolve this issue for us, but I believe that this change will also
likely benefit other file watchers.

When restoring the modified times, we need to now make sure that the
file exists because we are restoring after the working tree is cleared,
so if the file is new, it will not exist (which will cause it to blow
up).

[1]: https://github.com/webpack/webpack/issues/125

Change-Id: Ia28d6952bac5ef0d1ccac2276df2b62c46f11f68
Reviewed-on: http://gerrit.causes.com/44132
Tested-by: jenkins <jenkins@causes.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>