base::CPU: compute CPU family and model based on Intel and AMD manuals

Update how CPU family and model are computed for x86 architectures, using
the specifications in the Intel and AMD manuals.

In particular, the old code didn't take into account the extended family
when computing the display family. This computed an incorrect family for
AMD devices, because the common Intel microarchitectures have extended
family 0.

Also compute an extended model only for families where it is defined.

Moved the computation to a separate function, so it can be tested.

The family is used only in three places in the Chromium code base.
The use in chrome/browser/metrics/perf/cpu_identity.cc is what motivated
this change. The other two uses are used in logging.

BUG=b:128528055

Change-Id: I04de6c6cf22e0637246f89cfe0d1538bba194696
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1758824
Reviewed-by: Gabriel Marin <gmx@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Gabriel Marin <gmx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#687903}
3 files changed