Get cpu info from /sys where possible.

Fixes #4215.  May impact texture scaling performance.
Merge pull request #4219 from unknownbrackets/arm-threads

Get cpu core count info from /sys where possible