Resolve recipes, then resolve tasks

This pull request changes the behaviour of task resolution.

Now, if the same recipe dependency is included multiple times it no longer produces the tasks multiple times.  The recipe dependency will only be resolved once.

The resolver has been split such that it resolves all the recipes first, ensures it is distinct and then resolves the list of recipes into tasks.