This PR fixes an issue where template restarts would count twice since it was emitting a restarting event.
This adds a basic test for consul template, that verifies the behaviour of consul-template with task blocking and restarting of tasks