Implement the deploy_revision recipe and deploy hooks

Switched to including a recipe for hooks as this is easier to
handle and extend. Note that the deploy_revision specs include
some basic integration specs that do some fairly nasty setup
operations in shell as I couldn't find a way to mock/expect the
execution of the deploy hooks.