tests: fix SO_REUSEPORT tests for old Linux and non-Linux
On BSD-derived platforms the getsockopt true value may be any
(>= 0) value, not just one as it is on Linux.
Additionally, SO_REUSEPORT is only supported since Linux 3.9, so
folks on older kernels may not have it available. We still define it
for Linux since kernel upgrades are usually more common than glibc
upgrades.
Note: we will still raise an exception at runtime if a user
explicitly requests :reuseport in their config and runs an
older Linux kernel.
Reported-by: Andrew Hobson <ahobson@gmail.com>