lib/random: Make some functions in random.c inline