improve priorities handling

If priority==max_priority we try to assign workers to all buildings
of the corresponding resource.
factor a little: use FillRemainingSlots() in DoIndustry()