tst_ncpus_max: use kernel_max if available

sched_getaffinity() and sched_setaffinity() cares about number of possible
CPUs the OS or hardware can support, which can be larger than what
sysconf(_SC_NPROCESSORS_CONF) currently provides (by enumarating
/sys/devices/system/cpu/cpu* entries).

Use /sys/devices/system/cpu/kernel_max, if available. This represents
NR_CPUS-1, a compile time option which specifies "maximum number of CPUs
which this kernel will support". This should give us cpu mask size
large enough for any purposes.

If the kernel_max sysfs file is not available, fall back to
_SC_NPROCESSORS_CONF.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>