Consider existing nodes when allocating to a target

When allocations were made for small numbers of nodes (eg, one at
a time), they disproportionately ended up allocated to one target
because the algorithm was only considering the nodes it was
allocating at that moment rather than all nodes.  Change it to
consider existing nodes and calculate a desired number of nodes
for each target in consideration and try to meet that target.
This means that now if nodes are created one at a time, they will
be added to targets as needed to try to achieve the balance
specified in the config file.

Change-Id: Iede3bbf6fb406b61e5177ea046cbf07324335352