Gracefully handle pre-commit git stash failures

When attempting to `git stash` in the `setup_environment` method of the
`PreCommit` hook context, it was possible for the underlying execution
of `git stash` to fail.

Handle this case by actually inspecting the status code of `git stash`
before continuing the hook run.

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