core:fixing step numbering for steps and sub-steps

When a step is added to a job, it should get its step_number value
according to the existing steps already added to the job.
The same is for adding sub-step to an exiting step.

This patch fix a problem in adding step/sub-step when all added
steps/sub-steps get a 0 for the step_number value.

This resulted in incorrect order of steps and sub-steps in the UI while
steps where ordered by the step_number but this had no affect
since the step_number was always 0.

Change-Id: Ic72e9ab64160116f4fbac3f3b2cdea63db7b9c75
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1148466
Signed-off-by: Eli Mesika <emesika@redhat.com>