Some systems disable CPU cores. In the CPU tab this is fine,
but for an accurate representation of CPU load we need to check
for the number of active CPUs. E.g. OpenBSD disables HT on amd64
thus a 2-core system will only use 1 core.
This was much easier than I had reckoned.
Having the battery_names array is sadly a necessary evil for now.
Use the same logic for all platforms. Tested on FreeBSD.
Needs retesting on Linux, macOS and OpenBSD. The price of
support multiple operating systems!