BUG: Fix workflow step numbering

When using the following workflow, the numbering of the next/back was
always stuck to either 1 or 2. The typical approach for constructing a
worklow is to add a transition between each step following the pseudo-code
below:

steps = [s1, s2, s3, s4]
for i in  [0, steps.size()]
  if i not 0
    workflow.addTransistion(steps[i-1], steps[i])

In this case, we have: s1 <-> s2 <-> s3 <-> s4.
And when using backwardSteps(step) on s3, it gives only s2 as s3 does not
have any "knowledge" of s1, thus causing the bad numbering.

To fix this, the numbering is simply based on a breadth width search on the
transitions.