Consolidate several queries for hw.physmem on BSD.

There's no need to have three different checks for the same way of calling 'sysctl -n hw.physmem'. While here, adjust the spec test for OpenBSD as using 'sysctl -n' is equivalent to the cut(1) dance.