runtime: use hw.ncpuonline sysctl in getncpu on openbsd
runtime: use hw.ncpuonline sysctl in getncpu on openbsd

The number of CPUs reported by the hw.ncpu sysctl is twice as high as
the actual number of CPUs running on OpenBSD 6.4. with hyperthreading
disabled (hw.smt=0). Try hw.cpuonline first and fall back to hw.ncpu
in case it fails (which is the case on older OpenBSD before 6.4).

Fixes #30127

Change-Id: Id091234b8038cc9f7c40519d039fc1a05437c40d
Reviewed-on: https://go-review.googlesource.com/c/161757
Run-TryBot: Tobias Klauser <0a68dd4915066ec5d3f81f75a828fee53dcc8822@gmail.com>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Brad Fitzpatrick <ae9783c0b0efc69cd85ab025ddd17aa44cdc4aa5@golang.org>
Reviewed-by: Matthew Dempsky <e56ac2c500064424afac424d4b5e53bd0570a731@google.com>

golang/go,cloudflare/go,golang/go,golang/go,josharian/go,josharian/go,akutz/go,nawawi/go,akutz/go,CAFxX/go,CAFxX/go,golang/go,josharian/go,golang/go,nawawi/go,cloudflare/go,josharian/go,CAFxX/go,nawawi/go,josharian/go,cloudflare/go,nawawi/go,nawawi/go,cloudflare/go,nawawi/go,josharian/go,golang/go,CAFxX/go,golang/go,CAFxX/go,akutz/go,akutz/go,akutz/go,akutz/go,akutz/go,josharian/go,CAFxX/go,cloudflare/go,josharian/go,CAFxX/go,cloudflare/go,cloudflare/go,akutz/go,nawawi/go,nawawi/go,golang/go,cloudflare/go,CAFxX/go