Refactor: scheduler: functionize group colocation table initialization
This part of the newly unified colocated node scores function should probably
become a resource method, but the INFINITY_HACK stuff complicates that a bit.
This commit makes it easier to do that in the future. It also makes a long
function easier to follow.