When we finally get the time to write up a new C API we can worry about where to draw the line between the library and slapd code but for now it's all (philosophically) private to slapd.
(And of course, historically it made sense to put it in the library because it was also used by slurpd. But that reason is no longer pertinent...)
It was? slurpd uses ldap_pvt_thread_create() directly in both RE23 and openldap-2.0.0. Grepping it for pool finds nothing. However it does use libldap_r/threads.c, which starts and stops a pool.
Yet another matter, since I'm messing so much with tpool anyway: It's been confusing to have two types of contexts, thread and user contexts. I suggest to rename thread contexts to "tasks". They don't look very contexty to me anyway. As far as I can tell they are not exposed outside tpool.c, so it won't affect anything else. User contexts can be renamed back to plain contexts like in RE23.
(The code is confused, too - ldap_int_main_thrctx and my DELETED_THREAD_CTX are user contexts, not thread contexts.)