use sched_getaffinity and CPU_* to enforce cpumask

This will not only remove a bug in cpumask, but it will also make
semtest adhere to an existing cpumask so that taskset can be
used. Semtest will no longer fail if a cpuset (from cgroup) is enforcing
hard limits on the semtest.