build: add optional NUMA and CPU counts detection