CI/travis/before_install_darwin: Handle brew failures when installing packages.
CI/travis/before_install_darwin: Handle brew failures when installing packages.

For different Xcode versions builds may fail at "brew install"
because the package is already installed and needs
to be upgraded.

In order to fix this, the script will try to install, then upgrade,
then fail.

Signed-off-by: Alexandra.Trifan <951af57c14d42c73475635752bd213fd996792b2@analog.com>

analogdevicesinc/libiio,analogdevicesinc/libiio,analogdevicesinc/libiio,analogdevicesinc/libiio