kmemleak: Add more cond_resched() calls in the scanning thread