optimize GnuTLS fallback
The osmo_get_rand_id() uses GnuTLS as a fallback in case of getrandom is unavailable or fails.
It's been suggested to use static variable to cache the failure of getrandom and always use GnuTLS fallback after first getrandom failure.
The getrandom calls are compiled-time option and used only if available.To test this properly we first have to merge osmo_get_rand_id() support into osmo-*, than create test suite which measures the impact of getrandom calls. This requires following:
- getrandom support is compiled-in (default if available)
- gnutls fallback is enabled (default unless embedded build is used)
- getrandom always fails (not sure how to make this happen)