Relax test_socket_setSockoptTimeval_effective() on old kernels.

On older kernels, timeouts may return a few seconds early
so tolerate that on anything older than 3.18, which is the
kernel version for a sailfish running O MR1.

Converted to JUnit 4 (needed for an earlier patchset) and got
rid of a bunch of lint errors while I was in here.

Fixes: 176104885
Test: atest CtsLibcoreTestCases:libcore.android.system.OsTest
Change-Id: I529e98fe8507cadf007635cdba35e303f8537560
1 file changed