Add a reset nodes function

Instead of using the retry subflow function to reset all
nodes, create a reset nodes function that will reset the
state of a given iterator of nodes to PENDING and then change
there desired intention to a provided intention.

Change-Id: Ia3f4fd4537e30a88d0d7b2271ca5be54832f724d
Merge "Add a reset nodes function"