First pass

modularize scaffolding for node cluster

currently projects like cn, rtapi, ncar, pds all have a variant of this

please provide opinions

@Raynos @mrhooray @jsu1212 @kumikoda 
If I read this correctly, once `i` and `j` exceed the number of given logical identifiers, all subsequently spawned workers will be given the last `logicalId`. `i` and `j` will never differ for each iteration.

My intuition is that the number of given logical identifiers should meet or exceed the number of CPU’s. This should either create one worker for each id if there are more ids than CPU’s (making it possible to share code with less capable hosts) or fail if there are fewer ids than CPU’s (indicating that the identifier pool should be grown). In a later revision, it might make sense to accept any "iterable" so an arbitrary sequence of logical identifiers can be lazily generated.