cross-platform cpu count

also added assert_range test helper.
Fixes nv_get_cpu_count on OSX.
Merge pull request #4 from focusaurus/fix-osx-cpucount

cross-platform cpu count