lazily load the number of cores + test coverage

Since this was happening when the class was loaded, it was impossible to
test.  Also, problems during this load can bring down an app during
startup, which is not desired.
env var can avoid blowing up

This maintains the default behavior, but allows one to avoid it, e.g. in
a development environment where it doesn't really matter.
Merge pull request #410 from davetron5000/dont-die-querying-cores-during-a-require

Dont die querying cores during a require