Easier interface to rate-limited logs
It's a shame how much code we need to do a rate-limited log message. Duplicated code is usually a sign that a function somewhere is missing. Let's fix that.
Please have a look at branch easy_ratelim in my public repository, which introduces a convenience log_fn_ratelim() function, and uses it in a few places. Please review.