Add hooks

Starting with just two possible hooks:
- pre-deploy
- post-restart
hook.on('error', ...) error handling?