Clean /usr/local Git repository before calling brew doctor (rebased onto develop)



This is the same as gh-1177 but rebased onto develop.

----

When formulas are deleted by the bin/brew update operation, files remain
untracked in the main Git repository causing brew doctor to return a non-zero
error code. This commit fixes this by calling git clean -df post brew update.
Note this will potentially wipe out files not related to Homebrew and should
only be used in a testing environment.