With locModel=numa and tasks=qthreads, use hwloc's lstopo to create .good.
Get kernel scheduling affinity for the process, not the thread.

Reading a little between the lines of the man page, sched_getaffinity(2)
probably gets the calling thread's scheduling affinity by default, if
you pass 0 (zero) for the pid.  To get the scheduling affinity for the
process you have to pass the process's actual pid.  This makes that
change, with the result that modules/standard/machine/numCores passes
again with locModel=numa and tasks=qthreads.  (It had started breaking
with my https://github.com/chapel-lang/chapel/pull/156, which added the
sched_getaffinity() call to chpl_getNumPUsOnThisNode().)