Delete old server directory as part of upgrade
Load/save some env vars. Use bin/omero instead of the py CLI module.

subprocess.call('bin/omero', ...) is now used so that the omero environment such as PYTHONPATH can be changed (it's not possible to reload different versions of a Python module).
Remove use of path module from omero directory
Allow setting to also be specified at the command line.

E.g. export BRANCH=OMERO-stable ; python OMERO-aq-upgrade
is equivalent to python OMERO-aq-upgrade BRANCH=OMERO-stable
use omero from server/bin, save PATH, save env vars even if empty

Note PATH is needed because icegrid* binaries are version specific
Save env vars before starting server

This is so that if admin start works but web start throws an exception we'll still be able to recover the required environment
Delete old zip
Add --skipcheck otherwise admin ports fails when another server is running

'omero admin ports' checks if the server is running before changing the configured ports, but it can't tell whether it is this server or one in a different directory that is running.
Add note that original environment is being used
Remove extraneous debug print statements
Delete previous zip but not previous server directory by default
Don't use 'with' file context manager for backwards compatibility
Revert "Remove use of path module from omero directory"

This reverts commit e887016d899d490d556dbe21e4f83418fbb37fdc.
Return to using omero.cli.CLI for the new server

This partially reverts commit 626993f249faa21e4deda24cb677c3cf35997c5a
Check whether etc/grid/config.xml exists at start

Loading the omero pytohn module from the new server and calling omero.cli.CLI.loadplugins() causes a default etc/grid/config.xml to be created, which breaks the check for an existing config.
reconfigure variable name is misleading, changed to noconfigure
Tidy up deletion logic
Merge pull request #9 from manics/qa_upgrade_multienv

QA upgrade script multiple environments #11302