circleci: Detect core count

Authored by bgamari on Jul 6 2018, 9:57 AM.

Description

circleci: Detect core count

Test Plan: Try ./validate, CircleCI build; make sure core count
detection works in both cases.

Reviewers: alpmestan

Reviewed By: alpmestan

Subscribers: rwbarton, thomie, carter

GHC Trac Issues: Trac #14470

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