Refactor OS/CPU-count detection

**Detect CPU-core:**
* [x] uClinux http://www.uclinux.org/
* [x] FreeBSD http://www.freebsd.org/
* [x] GNU/kFreeBSD (GNU Debian on FreeBSD kernel) http://www.debian.org/ports/kfreebsd-gnu/index.en.html
* [x] NetBSD http://www.netbsd.org/
* [x] OpenBSD http://www.openbsd.org/
* [x] DragonFly http://www.dragonflybsd.org/
* [x] Darwin https://www.apple.com/
* [x] SunOS