backport SERVER-8420

add a tailcheck to detect cursor deadness