Clean /usr/local Git repository before calling brew doctor

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.
Prune dead symlinks
Define a testing mode to wrap Homebrew uninstallation and cleanup

This commit should allow people to keep on using this installation script. A
TESTING_MODE flag is defined conditionally to the presence of a JOB_NAME
variable by default (but can be overriden). The Homebrew/pip uninstallation
and cleanup operations as well as the PR merging step are only executed if
this flag is on.
Drop JOB_WS environment variable

Since 4.4.7, the python dependencies script is installed as part of the omero
formula. Dropping JOB_WS allows to use the OMERO-homebrew-install.sh script
without cloning the main repository.
Remove BREW_DIR variable: use /usr/local for Homebrew installation
Don't overwrite System properties (see #10828).
Merge pull request #1180 from sbesson/rebased/develop/homebrew-clean-install

Clean /usr/local Git repository before calling brew doctor (rebased onto develop)
Merge pull request #1201 from bpindelski/data-dir

Fix omero.data.dir ignored in current develop branch (see #10828)
Update JavaDoc.
Clean up imports.
Add logic for creating image-companion links
Unload annotations before saving pixels.

This fixes the issue where after creating the image annotation
it would get removed by the call to store.updatePixels().