validate: add simple CPU count autodetection

Summary: Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

Test Plan: ran ./validate on linux

Reviewers: austin

Reviewed By: austin

Subscribers: phaskell, simonmar, relrod, ezyang, carter

Differential Revision: https://phabricator.haskell.org/D146