Refactor upstart class to inherit upstart:params
Add support for "task" jobs.
Fix variable references in templates.
Ensure main class has been initialised.