allow running commands before and after deploy

* moves deployment to an internal deploy stage that will run after after_success
* adds a special before_deploy stage that will run before deploy, but only if we actually deploy
* adds a special after_deploy stage that will run after deploy, but only if we actually deploy