tests: Remove OS specific conditionals from tests

* tests/tests.lua (tests.is_linux): New function; returns true if
we're on Linux.
(tests.is_freebsd): New function; returns true if we're on FreeBSD.
* tests/test-event-init-uptime.lua: Updated accordingly.
* tests/test-event.lua: Likewise.