util,radv: Cross-platform monotonic condition variable
cnd_t operates on REALTIME clock, and isn't suitable for MONOTONIC use.
Clone the API, and implement using a monotonic clock.
In addition, I have prior fix and clean-up commits.
- mtx_timedlock and cnd_timedwait now correctly use relative milliseconds instead of absolute on Windows.
- Replace null checks with asserts. glibc doesn't check, and neither should we.
- Remove condition variable emulation necessary for Windows XP. Windows did not add native support for them until Vista.
- Remove frequency caching on Windows for being slightly unsafe. Improved caching method is a little messy (pre-main initialize from C++ file, extern "C"), and not that much faster, so I didn't implement it, but I could.
I ran basic glibc tests against both condition variable variants. Code runs clean after each commit.
Splitting off changes from !6162 (merged).
Edited by James Park