Create a new External module for running system and omero CLI commands 

This functionality was previously in upgrade.py, I've moved it into a separate file so that other modules such as the planned DB commands can use it.

Also added some new mocked unit tests.