Scheduling deadlock avoidance.

Make sure recipes from one recipeset are scheduled before recipes
from other recipesets are given the same resources.

Deadlock comes when recipesets don't have recipes' ids in order.

Change-Id: I468bcef008e994d0e074699e910e7bb807e67c22
Removes ABBA multi-host deadlocks.

Bug: 889065
Change-Id: I5793726a2769e86ea5b1f25d3cdbcdb40cee9aee