linux/threads: simplify timer code

Possibly also changes the semantics. According to the docs, it should now be
equal to the Windows code (up to accuracy issues, of course).

ping @gregory38 

This is actually more of an alternative implementation so that I can learn and find out why the current implementation is the way it is.
Since this is a kernel compile-time constant (I believe, I saw it last time while configuring a new kernel), the value doesn't change.

`sysconf()` might be a syscall, which is very slow, so I cache it in a static variable (which is also threadsafe).