Backporting from 2.12.x to 2.11.x

Backports of all those PR sent to 2.12.x that could have been targeted to 2.11.x:

 - scaladoc improvements: #3898, #3918, #3892, #3891, #3880, #3857, #3864, #3853, #3822, #3819, #3810
 - actual code changes (in the scaladoc tool): #3881, #3875 (last two commits here)

Changes to `src/library` only happen within scaladoc comments. It doesn't get more binary compatible than that.