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.
Add function to retrieve plane information from an image
Remove BREW_DIR variable: use /usr/local for Homebrew installation
Merge pull request #1177 from sbesson/homebrew-clean-install

Clean /usr/local Git repository before calling brew doctor
Merge pull request #1194 from sbesson/matlab_planeinfo

OMERO.matlab: Add function to retrieve plane information from an image