Move the deploy code to an internal package in preparation for the support for multiple mage targets deploying services to the Flow Platform. Add an option to deploy a service in the foreground.