Allow for a layer to stop when (sub-)goal is achieved
Currently each layer is forced to execute a fixed number of steps per (sub-)episode and only then stop and check whether the current (sub-)goal has been achieved. This is suboptimal: A layer should be able to stop a (sub-)episode earlier as soon as it has achieved a (sub-)goal.